I have table created by ORM named 'key'. 'key' is MySQL keyword so I cannot select it just SELECT * FROM key;.

How to perform select from table named 'key' in MySQL?

有帮助吗?

解决方案

Try to escape your table name with backticks `

SELECT * FROM `key`

This will make your database understand key is a table

其他提示

you can do

select * from [key]
许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top