# Database Discussions > IBM DB2 >  Spliting data from single col into two columns

## anan

how can i create a sql to split data from a single column into 2 columns as below

col 1

  Y
  Y
  N
  N

into

 Col A   Col B 

   Y      N
   Y      N

Thanks for your help.
Anan

----------


## sunshinesvn

I think the simplest way to accomplish this task is using Insert & delete statement:

Insert into Table(ColA)
select * from Table(Col1)
where Col1= 'Y';

Commit;


Insert into Table(ColB)
select * from Table(Col1)
where Col1<> 'Y';

Commit;

Then delete col1 if you wish

----------

