mirror of
https://github.com/HeidiSQL/HeidiSQL.git
synced 2026-03-13 09:24:25 +08:00
TOP(x) clause for UPDATES + DELETES introduced in MSSQL 2005. Do not use that on older servers. See http://www.heidisql.com/forum.php?t=13289
This commit is contained in:
@@ -3739,9 +3739,11 @@ begin
|
||||
Result := QueryType + ' ';
|
||||
case FParameters.NetTypeGroup of
|
||||
ngMSSQL: begin
|
||||
if QueryType = 'UPDATE' then
|
||||
Result := Result + 'TOP('+IntToStr(Limit)+') '
|
||||
else if QueryType = 'SELECT' then
|
||||
if QueryType = 'UPDATE' then begin
|
||||
// TOP(x) clause for UPDATES + DELETES introduced in MSSQL 2005
|
||||
if ServerVersionInt >= 900 then
|
||||
Result := Result + 'TOP('+IntToStr(Limit)+') ';
|
||||
end else if QueryType = 'SELECT' then
|
||||
Result := Result + 'TOP '+IntToStr(Limit)+' ';
|
||||
Result := Result + QueryBody;
|
||||
end;
|
||||
|
||||
Reference in New Issue
Block a user