TRUNCATE not highlight as keyword

zufuliu posted 12 months ago in General
TRUNCATE not highlight as keyword.
Want use TRUNCATE other than DELETE to Empty Tables
ansgar posted 12 months ago
At least in the current release and also the nightly builds, TRUNCATE *is* highlighted. Only it's both a function and a keyword, and the highlighter decides for the function.

From http://dev.mysql.com/doc/refman/5.0/en/mathematical-functions.html#function_truncate :

Returns the number X, truncated to D decimal places. If D is 0, the result has no decimal point or fractional part. D can be negative to cause D digits left of the decimal point of the value X to become zero.

From http://dev.mysql.com/doc/refman/5.0/en/truncate-table.html:
TRUNCATE TABLE empties a table completely. Logically, this is equivalent to a DELETE statement that deletes all rows, but there are practical differences under some circumstances.
zufuliu posted 12 months ago
when click the "Empty tabels..." context menu, AUTO_INCREMENT value not changed, but a TRUNCATE command does
ansgar posted 12 months ago
What has the "empty tables" menu item to do with the highlighter?

HeidiSQL fires a TRUNCATE <table> command when emptying tables.

Please login to leave a reply, or register at first.