Search...
FAQs
Subscribe
Pie
FAQs
Recent topics
Flagged topics
Hot topics
Best topics
Search...
Search within JDBC and Relational Databases
Search Coderanch
Advance search
Google search
Register / Login
Post Reply
Bookmark Topic
Watch Topic
New Topic
programming forums
Java
Mobile
Certification
Databases
Caching
Books
Engineering
Micro Controllers
OS
Languages
Paradigms
IDEs
Build Tools
Frameworks
Application Servers
Open Source
This Site
Careers
Other
Pie Elite
all forums
this forum made possible by our volunteer staff, including ...
Marshals:
Campbell Ritchie
Jeanne Boyarsky
Ron McLeod
Paul Clapham
Liutauras Vilda
Sheriffs:
paul wheaton
Rob Spoor
Devaka Cooray
Saloon Keepers:
Stephan van Hulst
Tim Holloway
Carey Brown
Frits Walraven
Tim Moores
Bartenders:
Mikalai Zaikin
Forum:
JDBC and Relational Databases
Sample SQL question
Alex gRin
Greenhorn
Posts: 3
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
I have a table that kind of looks like this
eID FIRSTNAME LASTNAME 1 Tom Smith 2 Sam Smith 3 Jack Smith
And another table that looks like this
eID SALARY FIRSTNAME LASTNAME 1 1000 2 2000 3 3000
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
eID SALARY FIRSTNAME LASTNAME 1 1000 Tom Smith 2 2000 Sam Smith 3 3000 Jack Smith
I tried one query before but it does not matches the info
Thanks
Jaikiran Pai
Sheriff
Posts: 10445
227
I like...
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
What's the question?
[
My Blog
] [
JavaRanch Journal
]
Venus Ong
Greenhorn
Posts: 7
posted 14 years ago
Number of slices to send:
Optional 'thank-you' note:
Send
Hello Alex
I think you may want to explore the
Merge
function of SQL for this case.
Cheers
Venus
incandescent light gives off an efficient form of heat. You must be THIS smart to ride this ride. Tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
reply
Bookmark Topic
Watch Topic
New Topic
Boost this thread!
Similar Threads
Search Query Problem
Help needed with ResultSet
That's what I meant by tough EJB-QL
Display the sequence numbers on the output rows of a select in Oracle 10g
Primary Key Autogeneration for InheritenceType. TABLE_PER_CLASS
More...