Before insert trigger to clean data
SQL
Easy
0 views
Problem Description
In Customers, automatically trim and lowercase email before insert.
Output Format
Trigger created
Constraints
MySQL-style NEW usage
Official Solution
CREATE TRIGGER trg_customers_email BEFORE INSERT ON Customers FOR EACH ROW SET NEW.email = LOWER(TRIM(NEW.email));
Solutions (0)
No solutions submitted yet. Be the first!
No comments yet. Start the discussion!