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 ]


Anil Singh is an author, tech blogger, and software programmer. Book writing, tech blogging is something do extra and Anil love doing it. For more detail, kindly refer to this link..

My Tech Blog -
My Books - Book 1 and Book 2 Powered by Blogger.