[MySQL]server version for the right syntax to use near ‘key FROM table’ at line 1

LINEで送る
Pocket

MySQLはkeyが予約語なため、以下のようにSELECTする

SELECT id,user_id,table.key FROM table;
Empty set (0.00 sec)

もしくはバッククォート

SELECT id,user_id,'key' FROM table;
Empty set (0.00 sec)

Was this helpful?

0 / 0

コメントを残す 0

Your email address will not be published. Required fields are marked *