Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Multiple Record Update

 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Quick SQL question for the experts out there...

I'm working on a database that has two tables that I'd like to combine into one. Here's the basic structure:



My goal is to just copy the name column from the UserNames table into the Users table, so that I end up with this:



I've already created the Name column within the Users table, but I'm unsure of how to write the SQL query to copy the names over from UserNames to Users. I want to do something like this:



I just need to know what the correct syntax is.

Thanks, folks.
 
Muhammad Saifuddin
Ranch Hand
Posts: 1324
Android Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The correct syntax is.

 
Corey McGlone
Ranch Hand
Posts: 3271
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Saif uddin:
The correct syntax is.



Thank you. Worked like a charm.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic