There are 2 tables. In the first we have:

1 2 3 

In the second:

 ф Ы В А П Р 

How to get the following sample:

 1:ф 2:ы 3:в :А :П :Р 
  • What are the rows here and what are the columns? What is the connection criterion? - msi
  • one
    and the order of the records in the tables is how to set, it’s necessary to give some sort of order by ... It's also very interesting why it might be needed - Mike
  • Say so, you need to wait for an inadequate report. Numbers and letters are strings. Order bye does not matter at all. - ArtemiyMVC
  • The task is to link 2 unrelated tables. - ArtemiyMVC

1 answer 1

First, the entries should be numbered in order (you will have to specify a certain order of sequence), and then link them to these line numbers:

 select ColumnX, ColumnY from (select ColumnX, row_number() over(order by ColumnX) rn from Table1 ) A full outer join (select ColumnY, row_number() over(order by ColumnY) rn from Table2 ) B on A.rn=B.rn 
  • Fine! Exactly what is needed! - ArtemiyMVC