What you want to see on DotNetFunda.com ?
DotNetFunda.Com Logo
Twitter TwitterLinkedIn
YouTubeGoogle
 Online : 19410 |  Welcome, Guest!   Register  Login
 Home > Code Snippets > SQL Server > Get all countries and corresponding cities? ...
Sabarimahesh

Get all countries and corresponding cities?

 Code Snippet posted by: Sabarimahesh | Posted on: 4/19/2012 | Category: SQL Server Codes | Views: 456 | Status: [Member] | Points: 40 | Alert Moderator   


By Using Right Outer Join

We can Do

Syntax


SELECT a.COUNTRY, b.CITY_NAME 

FROM CITIES b
RIGHT OUTER JOIN COUNTRIES a
ON b.COUNTRY_CODE = a.COUNTRY_CODE


Life is a Race
Thanks & Regards
By
Sabari Mahesh P M
Found interesting? Add this to:


>> Write Response - Respond to this post and get points

More codes snippets

About Us | Contact Us | The Team | Advertise | Software Development | Write for us | Testimonials | Privacy Policy | Terms of Use | Link Exchange | Members | Go Top
General Notice: If you find plagiarised (copied) contents on this page, please let us know the original source along with your correct email id (to communicate) for further action.
Copyright © DotNetFunda.Com. All Rights Reserved. Copying or mimicking the site design and layout is prohibited. Logos, company names used here if any are only for reference purposes and they may be respective owner's right or trademarks. | 5/24/2013 7:19:25 PM