Skip to content
Advertisement

How can I make the trigger return a value?

I have a ‘roomstate’ table that represents states that I keep updated.

This is what happens when the employee assigns room 2 to customer 1 whose booking_id is 2.

As the table above is continuously updated, the existing contents may become NULL again.

I’d like to have a record of updating this in another table.

example :

So, I used trigger.

I updated roomstate table but Trigger doesn’t work…

What did I do wrong?

Advertisement

Answer

It seems the issue is in your trigger declaration. Change it to as below –

For the new error you’re getting, you may specify the column names as well –

User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement