user1631421
user1631421

Reputation:

Update content of one column of sql table from another column of same table

Structure is like:

Col1        Col2
12345       12  
12348       14
20145       16
00541       13
51234       22

I want to copy col2 elements from col1 elements. What is query to do that?

Upvotes: 1

Views: 835

Answers (1)

jTC
jTC

Reputation: 1350

If all you want is for Col2 to equal Col1 then you can do it like this:

UPDATE aTable
set Col2 = Col1

Upvotes: 4

Related Questions