2024-01-15 11:31:03 +00:00
|
|
|
DELIMITER $$
|
2024-07-22 09:52:42 +00:00
|
|
|
CREATE OR REPLACE DEFINER=`vn-admin`@`localhost` FUNCTION `vn`.`worker_getCode`()
|
2024-01-15 11:31:03 +00:00
|
|
|
RETURNS varchar(3) CHARSET utf8mb3 COLLATE utf8mb3_general_ci
|
|
|
|
NOT DETERMINISTIC
|
|
|
|
READS SQL DATA
|
|
|
|
BEGIN
|
|
|
|
DECLARE vUserCode VARCHAR(3) CHARSET utf8 COLLATE utf8_unicode_ci;
|
|
|
|
|
|
|
|
SELECT code INTO vUserCode
|
|
|
|
FROM worker
|
|
|
|
WHERE id = account.myUser_getId();
|
|
|
|
|
|
|
|
RETURN vUserCode;
|
|
|
|
END$$
|
|
|
|
DELIMITER ;
|