-
-
Save faryne/04bd37434c835841cbc4 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TRIGGER insert_enc BEFORE INSERT ON dmhy_lists | |
FOR EACH ROW | |
BEGIN | |
IF UPPER(NEW.title) REGEXP '(繁|BIG5)' THEN | |
SET NEW.enc = '1'; | |
ELSEIF UPPER(NEW.title) REGEXP '(简|GB)' THEN | |
SET NEW.enc = '2'; | |
END IF; | |
END; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment