Hi, I have 2 sql student tables Student1 and Student2Student1Student ID Name Test taken Test Date Test Result1 Sam TB 05/23/2010 Pending1 Sam MMR 06/20/2010 Pending2 Tom MMR 07/14/2010 PendingStudent2Student ID Name Test taken Test Date Test Result1 Sam TB 05/23/2010 Pass2 Tom MMR 07/14/2010 Pass
As you can see, both the tables have no primary key and some entries in Student1 are updated in Student2I want to write an sql query that will update all the matching Student1 entries from Student1. For the entries to match, the Student ID, Name, Test taken and Test Date fields should match. Then for these matching entries we check if the Test Result has been updated and update the same in the table Student1.So, our Student1 table after executing the query should beStudent1Student ID Name Test taken Test Date Test Result1 Sam TB 05/23/2010 Pass1 Sam MMR 06/20/2010 Pending2 Tom MMR 07/14/2010 Pass
Someone please help me write this query.