1、如果是"100"是变动的参考如下:
select * from table where 编号>:no
parambyname('no').asinteger:=你的条件.2、如果是“where”条件是变动的,参考如下:
str:=你的查询条件
('select * from table where '''+str+'''');
select * from table where 编号>:no
parambyname('no').asinteger:=你的条件.2、如果是“where”条件是变动的,参考如下:
str:=你的查询条件
('select * from table where '''+str+'''');
sql.add('where no=:tempno');
parambyname('tempno').asinteger:=strtoint(edit.text);
open;好象用参数比较好一点
嘻~
SQL语句可以写成
Query1.SQL.Clear;
Query1.SQL.Text:=Format(‘select * from table where 编号>%d’,[变量名]);
Query1.Open;