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 |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2003-01-29 : 09:00:31
|
| jaideep writes "hi, i have a table on which i need to do updates.its a self-referncing join.in the example below i need to update the fname and lname fields.SSN COURSEID FNAME LNAME111-11-111 2023 JOHN SMITH111-11-111 2354 NULL NULLwht should be the sql syntax...any suggestions are welcome......" |
|
|
SamC
White Water Yakist
3467 Posts |
Posted - 2003-01-29 : 09:34:33
|
| UPDATE MyTableNameSET Fname='Bob', Lname='Shenoy'WHERE SSN = '123-456-7899'For more information, have a look at UPDATE in SQL Books Online.SamEdited by - SamC on 01/29/2003 10:05:33 |
 |
|
|
ValterBorges
Master Smack Fu Yak Hacker
1429 Posts |
Posted - 2003-01-29 : 09:53:47
|
| Why are you storing the FNAME AND LNAME in the studentcourses table? All you require are the ssn and courseid and ssn with a relationship to the students table and another to the courses table. Then you won't need to update the courses table everytime the students table changes. http://www.swynk.com/friends/faour/databasedesign1.asp |
 |
|
|
|
|
|