MySQL SQL语法错误

时间:2013-09-26 01:56:57

标签: mysql sql

为什么我总是在以下内连接上遇到语法错误:

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

1 个答案:

答案 0 :(得分:2)

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;