Y
yun.li
Unregistered / Unconfirmed
GUEST, unregistred user!
1. 请问在SQL语句中空值怎么应用?
Add('select * from login where userid=''null'' '); ???
Add('select * from login where userid='''' '); ???
该怎么写??
2. 对于多条语句比如说要用到Select,Update,Delete等多条语句,
是否对每一条SQL语句都必须按如下方式书写,有没有比较简洁的方式:
with ADOQuery1 do
begin
Close;
with SQL do
begin
Clear;
Add('select * from login where userid=1 ');
end;
end; //with...do
Add('select * from login where userid=''null'' '); ???
Add('select * from login where userid='''' '); ???
该怎么写??
2. 对于多条语句比如说要用到Select,Update,Delete等多条语句,
是否对每一条SQL语句都必须按如下方式书写,有没有比较简洁的方式:
with ADOQuery1 do
begin
Close;
with SQL do
begin
Clear;
Add('select * from login where userid=1 ');
end;
end; //with...do