File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes Multiple Record Update Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "Multiple Record Update" Watch "Multiple Record Update" New topic
Author

Multiple Record Update

Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
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.


SCJP Tipline, etc.
Muhammad Saifuddin
Ranch Hand

Joined: Dec 06, 2005
Posts: 1321

The correct syntax is.



Saifuddin..
[Blog][Linkedin] How To Ask Questions On JavaRanch My OpenSource
Corey McGlone
Ranch Hand

Joined: Dec 20, 2001
Posts: 3271
Originally posted by Saif uddin:
The correct syntax is.



Thank you. Worked like a charm.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Multiple Record Update