sqlStr:='';
for i:=0 to datelist.Count -1 do
begin
if i=0 then
sqlStr:=format('ALTER TABLE %s MODIFY %s %s NULL',
[tablename,cloumnlist.Strings[i],datelist.Strings[i]])
else
sqlStr:=sqlstr+''';commit;'''+#10#13+format('ALTER TABLE %s MODIFY %s %s
NULL',[tablename,cloumnlist.Strings[i],datelist.Strings[i]]);
end;
然后sql.add,execSql.
报错:
check the manual that corresponds to your MySql server version for the right syntax to use near'';commit;;
ALTER TABLW a_areasort MODIFY state int(11) NULL'at line 1'.process stopped. Use Step or Run to continue;