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.CountryName   from tblcountry (nolock))

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


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 - and
My Books - Interview Questions and Answers Books- Get Your Book in 15+ Digital Stores Worldwide..

You Might Also Like Powered by Blogger.
ASK Questions