Update Record in two Table using trigger

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ranjana1980
    New Member
    • Jul 2008
    • 15

    Update Record in two Table using trigger

    Hi All,
    I have two tables One is Student And another is AcademicQualifi cation.In first table RegNo is primary key and in second one it is foreign key then how to create trigger to update table where Student.RegNo = AcademicQualifi cation.RegNo
  • amitpatel66
    Recognized Expert Top Contributor
    • Mar 2007
    • 2358

    #2
    Why you need a trigger to update the values in the tables....a simple update statement will suffice

    Comment

    • ranjana1980
      New Member
      • Jul 2008
      • 15

      #3
      Originally posted by amitpatel66
      Why you need a trigger to update the values in the tables....a simple update statement will suffice
      simple update statement using two tables not work .

      update Student as s,AcademicQuali fication as a set s.FName='Maya', s.LName='Sharma ',a.InstituteNm ='St Joseph',a.Unive rsity='Barkatul lah' where s.RegNo==a.Regn o

      Comment

      Working...