sql >> Base de Datos >  >> RDS >> Sqlserver

Consulta Sql de unión cruzada

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