Click here to Skip to main content
12,078,090 members (44,799 online)
Click here to Skip to main content
Articles » Database » Database » SQL Server » Downloads

Stats

145.1K views
3.1K downloads
89 bookmarked
Posted

Understanding Table Joins using SQL

, 22 Jul 2013 CPOL
Joins are useful for bringing data together from different tables based on their database relations. First we will see how the join operates between tables. Then we will explore the Order of Execution when Join and where condition both exists. Finally we will move our exploration to the Importance o
CreateObject.zip
instnwnd.zip
CREATE TABLE Table_A( ID numeric(2, 0) NULL, SampleColumn1 nchar(10))
Go

CREATE TABLE Table_B(ID numeric(2, 0) NULL, SampleCol2 nchar(10))
Go

CREATE TABLE Table_Trans( IDD numeric(2, 0) NULL, SomeTransCol nchar(20) )
Go

Insert into Table_A values(1,'AAA')
Go

Insert into Table_A values(2,'BBB')
Go

Insert into Table_B values(1,'RRR')
Go

Insert into Table_B values(2,'SSS')
Go

Insert into Table_B Values(3,'PPP')
Go

Insert into Table_Trans Values(1, 'Transaction 1')
Go

Insert into Table_Trans Values(3, 'Transaction 2')
Go

Insert into Table_Trans Values(3, 'Transaction 3')
Go

Insert into Table_Trans Values(3, 'Transaction 4')
Go

Insert into Table_Trans Values(1, 'Transaction 5')
Go

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

Sivaraman Dhamodharan
Software Developer iSOFT
India India
I am working as software engineer in iSOFT R&D. I have been come accross C++,MFC, .net technologies. I do like playing video games, reading books.

Web: www.mstecharticles.com


You may also be interested in...

| Advertise | Privacy | Terms of Use | Mobile
Web03 | 2.8.160212.1 | Last Updated 22 Jul 2013
Article Copyright 2012 by Sivaraman Dhamodharan
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid