|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
AT&T devCentral & BlackBerry(r) Webcast Series: BlackBerry and GPS -Build Location Awareness into your BlackBerry Applications, July 10th-1:00PM EST. Register Today!
|
|
#1
|
|||
|
|||
|
Simple Sql Help Needed
I have 2 users tables with a primary key on the employee number record. One contains a employee_name record for each person and I want to copy all of these names from one of the users tables to a employee_name column in the other. Can someone tell me the sql I need to achieve this?
|
|
#2
|
|||
|
|||
|
Are the tables related by the employee_number field? Is the employee_number field consistent between the two tables?
If so, and depending on your database you can try this: update table1 set employee_name = (select t2.employee_name from table1 t1 INNER join table2 t2 on t1.emp_num = t2.emp_num) |
![]() |
| Viewing: Dev Shed Forums > Databases > Database Management > Simple Sql Help Needed |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|