Triggers

Update customer credit score on address update
AskAI

Update customer credit score on address update: - Given a table of customer data with name, address, credit score, and date of last address update columns, - write a trigger that will automatically update the customer's credit score whenever their address is updated. - Output will be the customer table with updated credit scores.

145
Jan 27
Update total department salary on employee salary update
AskAI

Write a trigger that will update the total salary for each department when an employee's salary is updated.

177
Nov 26
SQL Trigger to Automatically Update "last_updated" Column
AskAI

This technical problem describes how to write a SQL trigger that will automatically update the "last_updated" column whenever a change is made to any of the other columns in a table. The example input table contains employee data, and the example output shows how the "last_updated" column would be updated after a change is made to one of the other columns.

151
Nov 21
Update customer balance field when new purchase is made
AskAI

Write a trigger that updates a customer's balance field in a customer table whenever a new purchase is made, using data from a purchase table.

139
Nov 14
Trigger to Log Time, Date, and User for Inserts, Updates, and Deletes
AskAI

This technical problem involves designing a trigger that will log the time, date, and user who performed an insert, update, or delete on a table.

110
Nov 14
Preventing users from inserting rows without an id.
AskAI

This technical problem describes how to create a trigger that will prevent a user from inserting a row into a table if the user's id is not in the table.

91
Nov 13
Updating the "last_updated" column in a table with a trigger.
AskAI

A trigger is needed that will update the "last_updated" column in a table every time a row is inserted or updated.

153
Nov 04
Updating a table's "modified_date" column with a trigger
AskAI

A trigger can be used to update the "modified_date" column in a table every time a row is updated.

116
Nov 01