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 |
monadel
Starting Member
3 Posts |
Posted - 2009-01-19 : 17:59:13
|
Hi All,I have a problem creating a new trigger here.I am a new with trigger.I want to create a simple trigger to automatic update a field on Table B when I update a data field on table A.For example Table A have docID, firstnameTable B have docID, fname.docID will be connection between table A and B.Could anyone help me and show me a working trigger like a describe above please?Thank you |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2009-01-20 : 01:57:48
|
Homework?CREATE TRIGGER dbo.trgTableA_UpdateON TableAAFTER UPDATEASUPDATE bSET b.fName = i.FirstNameFROM TableB AS bINNER JOIN inserted AS i ON i.docID = b.docID E 12°55'05.63"N 56°04'39.26" |
 |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-01-20 : 02:36:17
|
suggest you to refer to books online about triggers to understand how they work and also significance of inserted,deleted table |
 |
|
|
|
|