Using Oracle 9i converting a single text column list into a 2 column list

oracle, select, sql

Solution

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;

Problem

I have a list of countries ``` SELECT * FROM COUNTRIES COUNTRY -------------- Austria Belarus Belgium Finland France Iceland Ireland Switzerland ``` How would I select this as 2 columns e.g ``` COLUMN1 COLUMN2 ------- ------- Austria Belarus Belgium Finland France Iceland Ireland Switzerland ``` Thanks.

Original source