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

breaks with an error:

[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.

With aliases it also doesn't work.

As well DbVizualizer highlights the role in role.name for example as command name

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Vladimir Kolenov
  • 438
  • 1
  • 4
  • 14

1 Answers1

1

You mis-typed the joined table:

SELECT role.name, role_privelege.privelege 
FROM role
JOIN role_privelege ON role.id = role_privelege.id
Joel Coehoorn
  • 399,467
  • 113
  • 570
  • 794