Sqlserver
 sql >> Datenbank >  >> RDS >> Sqlserver

Cross-Join-SQL-Abfrage

SELECT        C2.name, C.Name AS Expr1, S.Name AS Expr2
FROM            City c 
LEFT OUTER  JOIN State s ON c.stateid = s.id
LEFT OUTER  JOIN Country c2 on s.countryId = c2.id