[sql] 234567890
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
- -- запрос к таблице "users"
- SELECT * FROM users
- WHERE user_code IN (6, 7, 8, 3); -- создание триггера DELIMITER // CREATE TRIGGER check_empty_values BEFORE INSERT
- ON users FOR EACH ROW BEGIN IF NEW.last_name = ''
- OR NEW.name = ''
- OR NEW.surname
- OR NEW.addres = ''
- OR NEW.telephone = '' IS NULL THEN
- SIGNAL SQLSTATE '45000' SET MESSAGE_TEXT = 'Нельзя вставлять строки с пустыми значениями!';
- END IF; END// DELIMITER ;
Editor
You can edit this paste and save as new: