SQLTeam.com | Weblogs | Forums

Write query to insert into Col2 values opposite to Col1

Hi All
How to write a query to insert Col2’s values to look exactly opposite to Col1’s values? Or to get such result is possible only using UPDATE statement?
The result should be looks like:
Col1 Col2
1....... 0
0........1
0........1
1....... 0
Thanks

Define opposite. What if value 36 or 666. Or are the values always 1 or 0

You didn't say what you're really trying to achieve, but storing a column that is a one-to-one reflection of the values in another column would de-normalize the table.