lundi 26 janvier 2015

How to select a record and update another record with selected


Say I have a table



User
User_key User_id User_name User_status State
1 001 Adam Active CA
2 002 Zack Active NY
3 003 Jack Deactivated DC
4 004 Neil Active KS


I need to Select and update user_id 003 with user 004 information. Should look something like this



User
User_key User_id User_name User_status State
1 001 Adam Active CA
2 002 Zack Active NY
4 004 Jack Active DC
4 004 Neil Active KS


user_name and state should be unchanged.


Thanks





Aucun commentaire:

Enregistrer un commentaire