Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
sikharma13
Starting Member
44 Posts |
Posted - 2013-11-14 : 16:30:52
|
i have a table named masterlist whereinthe columns are :name-----age------sexandrew---19-------maletrisha---23------femaleand i have also another table which is namelistthat is linked to the masterlist table.. after i search for the record andrew in the table namelisti updated andrew as 25 and sex is female..now i want reset andrew's record, same to the records that andrew has in the table masterlist..what query do i need to use??thanks!VFP9.0 via MySQL 5.0 |
|
Bustaz Kool
Master Smack Fu Yak Hacker
1834 Posts |
Posted - 2013-11-14 : 19:47:14
|
[CODE]update nlset age = ml.age, sex = ml.sexfrom namelist nlinner join masterlist ml on ml.name = nl.name[/CODE]HTH=================================================No, no, you're not thinking, you're just being logical. -Niels Bohr |
|
|
sikharma13
Starting Member
44 Posts |
Posted - 2013-11-14 : 19:54:30
|
ill rephrase my topic..i think it kinda confused me.. so this is much simple problem..I have a table ed_abcdeeh with columns(school_id,name_of_school,level)Another table m_abcdeeh with columns(school_id,name_of_school,grade_level)I want to update all rows in table ed_abcdeeh with values from m_abcdeehVFP9.0 via MySQL 5.0 |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-11-14 : 23:07:29
|
UPDATE ea ea.name_of_school = ma.name_of_school ,ea.level = ma.grade_levelFROM ed_abcdeeh eaJOIN m_abcdeeh ma ON ea.school_id = ma.school_id--Chandu |
|
|
|
|
|