Reputation: 8443
I accidentally named a table 'order'. Since 'order by' is a keyword phrase, I am unable to delete this table:
> drop table order;
ERROR 1064 (42000): You have an error in your SQL syntax; ...
How do I drop the table ?
Upvotes: 1
Views: 344
Reputation: 2627
Using backticks around the table name:
drop table `order`;
will work.
Upvotes: 1
Reputation: 300549
The default identifier quote character is the backtick (“`”):
drop table `order`;
Upvotes: 1