SELF JOIN Syntax
SELECT YourColumnName FROM YourTableName T1, SelfJoinTableName T2 WHERE Condition
Example
SELECT t1.CityName, t2.CountryName FROM City t1, Country t2
WHERE t1.CountryName = t2.CountryName
ORDER BY t2.CountryName
SELECT YourColumnName FROM YourTableName T1, SelfJoinTableName T2 WHERE Condition
Example
SELECT t1.CityName, t2.CountryName FROM City t1, Country t2
WHERE t1.CountryName = t2.CountryName
ORDER BY t2.CountryName
No comments:
Post a Comment