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
[ 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 ]