0

Sample: There is a table with 3 columns, c1, c2 and c3.

- c1 is the PK. 
- c2 is empty.
- c3 is same data type as c2 and empty.

How to write a sql statement to copy values in c3 to c2 for all rows accordingly?

1
  • 4
    If both c3and c2are empty, what's the point of copying between them? Anyway, you want an update statement as suggested by @TechDo Commented Nov 15, 2013 at 7:19

1 Answer 1

4

Please try:

UPDATE YourTable
SET C2=C3
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.