Re: delete from table limit @var; is not working
Sergei Golubchik <[email protected]>
| Newsgroups | gmane.comp.db.mysql.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi!
On Apr 28, "qwerq qerq" wrote:
> The following command:
> delete from table limit @var;
> says syntax error... why?
> -- Server version 4.0.17-max-debug
Because the manual specifies the syntax as:
DELETE [LOW_PRIORITY] [QUICK] [IGNORE] FROM tbl_name
[WHERE where_definition]
[ORDER BY ...]
[LIMIT row_count]
It does not say LIMIT expr, so expressions are not allowed -
you can have only integer literals in LIMIT clause.
Regards,
Sergei
--
__ ___ ___ ____ __
/ |/ /_ __/ __/ __ \/ / Sergei Golubchik <[email protected]>
/ /|_/ / // /\ \/ /_/ / /__ MySQL AB, Senior Software Developer
/_/ /_/\_, /___/\___\_\___/ Osnabrueck, Germany
<___/ www.mysql.com
--
MySQL Bugs Mailing List
For list archives: http://lists.mysql.com/bugs
To unsubscribe: http://lists.mysql.com/[email protected]