Join two Tables Without any Relations in SQ-Server 2008 R2

Join two Tables Without any Relations in SQL Server 2008 R2

Hello everyone, i am going to share the code sample how to join two tables without any relations in between as given below.

[ select row_number() over (order by RoleName) RowNum, tblrole.ID,tblrole.RoleName   
      from tblrole where tblrole.ClientId=" + SessionManager.CompanyId + " ),

                     OrderedBars as (select row_number() over (order by CountryName) RowNum, tblCountry.id,tblCountry.CountryName   from tblcountry (nolock))

   select f.ID,f.RoleName,u.id,u.CountryName from OrderedFoos f full outer join OrderedBars u on u.RowNum = f.RowNum ]





ANIL SINGH

Hey! I'm Anil Singh. I author this blog. I'm Active Blogger, Programmer. I love learning new technologies, programming, blogging and participating the forum discussions more...
My Blogs - http://www.code-sample.com and http://www.code-sample.xyz
My Books - Google Amazon and Flipkart Book Store!

You Might Also Like
Post a Comment
www.code-sample.com/. Powered by Blogger.
ASK Questions
SQL Server NodeJs TypeScript JavaScript Angular SQL Server My Book