Categoria: cheatsheet,sql

SQL cheasheet

In same query you can refer to same table twice 12345select firstname, lastname from names as a, names as b WHERE a.firstname = b.firstname AND a.lastname != b.lastname