aspose file tools*
The moose likes JDBC and the fly likes Sample SQL question 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 "Sample SQL question" Watch "Sample SQL question" New topic
Author

Sample SQL question

Alex gRin
Greenhorn

Joined: Nov 21, 2009
Posts: 3
I have a table that kind of looks like this



And another table that looks like this


What is the right query to take the firstname lastname from table one and insert it to table 2 so that the name matches with id and would look like this


I tried one query before but it does not matches the info

Thanks
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 10202
    
166

What's the question?


[My Blog] [JavaRanch Journal]
Venus Ong
Greenhorn

Joined: Dec 10, 2009
Posts: 7
Hello Alex

I think you may want to explore the Merge function of SQL for this case.

Cheers
Venus
 
 
subject: Sample SQL question