-1

I'm sure this is a very simple question.

I have a table with a column that has a series '1' and '0'.

I want to create two more columns. On column with only '1' and another with only '0'.

I was able to get data based on this information with:

SELECT (Column_name) From table_name AS number_o_ones WHERE Column_name=1;

I don't know how to turn that into a proper column inside of the table though.

Thank you for your help. If you have any questions let me know.

Johntr3
  • 1
  • 1

1 Answers1

0

i think you need below query where by using case when you can create different value column

 select Column_name, case when Column_name=1 then 1 end as 1_val,
 case when Column_name=0 then 0 end as 0_val from your_table
Zaynul Abadin Tuhin
  • 31,407
  • 5
  • 33
  • 63