我在从机上有一些触发器。 它不会触发子查询。 没有子查询,它就可以工作。
谢谢
INSERT INTO s_address (lastname,address,telephone,city)
VALUES('yilmaz','my new address','905548185555',
(SELECT `city_name` FROM s_city WHERE city_id='58')
) ;
DELIMITER $$
CREATE TRIGGER `s_address_BEFORE_INSERT` BEFORE INSERT ON
`s_address` FOR EACH ROW
BEGIN
SET NEW.lastname = mask_lastname(NEW.lastname);
SET NEW.address = mask_address(NEW.address);
SET NEW.telephone = mask_tel(NEW.telephone);
END$$