开发者

error in query with JOIN USING

Consider this simple query:

SELECT * FROM table1 JOIN table2 USING(pid) WHERE pid='2' ;

I get this error:

1142: SELECT command denied to user 'root'@'localhost' for column 'pid' in table 'table1'

When I replace USING with ON (and this right syntax...) the error 开发者_运维知识库disappears.

What is the problem?


The exception is saying that your database security is setup to not allow the user context being run under doesn't have access to that column. What permissions have been applied to that column?

Try to fix those permissions problems. Grant select permissions, or remove those deny permissions.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜