Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

What are the virtual tables available during database trigger execution?

0
Posted

What are the virtual tables available during database trigger execution?

0

Answer Hi Binay, The two virtual tables available during trigger execution are OLD and NEW. These have the same column names as that of base table on which trigger is written. Triggers for INSERT, since we are inserting a new row, only NEW.column names have value (OLD values are null) Triggers for UPDATE, since we are updating old values to new values, both OLD.column and NEW.column have values Triggers for DELETE, since we are deleting the old record, only OLD.column names have value (NEW values are null) Hence we assign the :old and :new columns as appropriate in a trigger.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123