haibec Posted August 19, 2006 Share Posted August 19, 2006 I have two Table : Student include field : ID ,NAme,classs an a Table :Point include ID ,Point, name,class . I want when Update a table ,exemple : Student then The table Point so-so updated!Please help me Link to comment Share on other sites More sharing options...
nomore_sr Posted August 20, 2006 Share Posted August 20, 2006 I have two Table : Student include field : ID ,NAme,classs an a Table :Point include ID ,Point, name,class . I want when Update a table ,exemple : Student then The table Point so-so updated!Please help meHope this useful. I tried and it workedCreate trigger St_update on Studentfor updateAs update Point set [iD]=(select [iD] from Inserted), [Name]=(select [Name] rom Inserted), Class=(select Class from Inserted) where [iD]=(select [iD] from Deleted) Your Student table should have primary key. In this case I chose ID as primary key Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now