为什么我在以下内部联接上总是遇到语法错误:
SELECT 'myapp_instagram_shop'.id
FROM 'myapp_instagram_shop'
INNER JOIN 'myapp_instagram_shop_picture'
ON 'myapp_instagram_shop'.id = 'myapp_instagram_shop_picture'.shop_id;
错误是:
1064 - You have an error in your SQL syntax; check the manual that corresponds to
your MySQL server version for the right syntax to use near ''myapp_instagram_shop'
INNER JOIN 'myapp_instagram_shop_picture' ON 'sh' at line 1
最佳答案
尝试
SELECT myapp_instagram_shop.id FROM myapp_instagram_shop INNER JOIN myapp_instagram_shop_picture ON myapp_instagram_shop.id = myapp_instagram_shop_picture.shop_id;
关于mysql - MySQL SQL 语法错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19018099/