siva nathan

siva nathan

  • 946
  • 828
  • 235.3k

how to use trigger when specified table column update in mysql

Aug 21 2020 10:11 AM
Hi all,
I have a 3 table  explained in below
 
table1 contains below columns 
 
 id  Currency Symbol  Currency Name
 1  $  dollor
 
Table 2 contains below columns
 id     Project  CurrencyId
 1  Project#1  1
 
Table 3 contains below columns
 id  Item details  projectId  Currencyid
 1  CPU  1  1
 
table 1 refers currency master 
Table 2 refers project details
table 3 refers Item related for projects
i need to write a trigger when project table currency id changes(update) that reflects Item related for project table 
 
Example:
If project table currency ID updates to 2 at that time trigger need to be generated and update the Itemrelated projects table currency id column  

Answers (1)