SQL 服务器查询 table 哪个名称与命令名称匹配

SQL Server queries to table which name matches the command name

SELECT role.name, role_privelege.privelege 
FROM role
JOIN role ON role.id = role_privelege.id

因错误而中断:

[Error Code: 1013, SQL State: S0001]
The objects "role" and "role" in the FROM clause have the same exposed names. Use correlation names to distinguish them.

使用别名也不起作用。

DbViizualizer 还突出显示 role.name 中的 role 作为命令名称

你打错了加入的 table:

SELECT role.name, role_privelege.privelege 
FROM role
JOIN role_privelege ON role.id = role_privelege.id