http://topic.csdn.net/u/20090317/16/288c8072-020c-466c-803b-24c8704d5dea.html?seed=1335842558
Delphi(Pascal) code
var
sqlStr:String;
begin
sqlStr:= ' begin '
sqlStr:= sqlStr+ 'update table1 set col1 = ''test'' where 1=2;';
sqlStr:= sqlStr+ 'update table1 set col1 = ''test2'' where 1=2;';
sqlStr:= sqlStr+ ' end ';
adoquery1.Close;
adoquery1.SQL.Clear;
adoquery1.SQL.Add(sqlStr);
adoquery1.ExecSQL;
end;
把sql语句用begin...end包起來,再提交給DB处理,就OK了!