I have 2 table that i must update table 1 and take the data from table 2 that table 2 is history file for example : table 1 Name | Class | Number | nick | | | james | | | Moo | | |
table 2
Name | Class | Number | nick | 2E | 54 | james | 3C | 66 | Moo | 4D | 98 |
do you know how to update table 1 if data from table 2 to is so much and just using indicator Name? please help me for the script
SELECT t1.* --UPDATE t1 SET -- Class = t2.Class, -- Number = t2.Number FROM Table1 t1 INNER JOIN Table2 t2 ON t1.name = t2.name WHERE <place your condition(s) here>
Try first with SELECT and it pulls the required data.. then use udpate query .