使用Oracle 9i将单个文本列列表转换为2列列表

Dav*_*vid 3 sql oracle select

我有一份国家清单

SELECT * FROM COUNTRIES

COUNTRY
--------------
Austria
Belarus
Belgium
Finland
France
Iceland
Ireland
Switzerland
Run Code Online (Sandbox Code Playgroud)

我如何选择2列,例如

COLUMN1          COLUMN2
-------          -------
Austria          Belarus
Belgium          Finland
France           Iceland
Ireland          Switzerland
Run Code Online (Sandbox Code Playgroud)

谢谢.

Flo*_*ita 5

select country, next_country
from 
  (select country, 
         lead(country) over (order by country) next_country,
         row_number() over (order by country) rnk
   from countries
  ) 
where mod(rnk,2)=1;
Run Code Online (Sandbox Code Playgroud)