我在 MySQL 中不断收到此警告,但不知道为什么。下面提供的功能。
Warning | 1329 | No data - zero rows fetched, selected, or processed
功能:
CREATE FUNCTION CONTACT_INFO_EXISTS(
hp VARCHAR(64),
wp VARCHAR(32),
mp VARCHAR(32),
f VARCHAR(32),
pe VARCHAR(64),
se VARCHAR(64),
c TIMESTAMP
)
RETURNS VARCHAR(36)
READS SQL DATA
BEGIN
DECLARE c_id CHAR(36);
SET c_id = NULL;
SELECT contact_infouuid INTO c_id FROM contact_info
WHERE (home_phone = hp OR hp IS NULL)
AND (work_phone = wp OR wp IS NULL)
AND (mobile_phone = mp OR mp IS NULL)
AND (fax = f OR f IS NULL)
AND (primary_email = pe OR pe IS NULL)
AND (secondary_email = se OR se IS NULL)
AND (last_updated = c OR c IS NULL)
LIMIT 1;
RETURN IF(c_id IS NOT NULL, c_id, '0');
END$$