From 2aed099e3622df21575902e62cfe6280819f3465 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 11 Oct 2016 11:04:37 +0800 Subject: [PATCH] MOVED mysql/company_get_name.sql to mysql/core_company_get_name.sql --- mysql/core_company_get_name.sql | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 mysql/core_company_get_name.sql diff --git a/mysql/core_company_get_name.sql b/mysql/core_company_get_name.sql new file mode 100644 index 00000000..de0eb141 --- /dev/null +++ b/mysql/core_company_get_name.sql @@ -0,0 +1,12 @@ + + +DROP FUNCTION IF EXISTS company_get_name; +DELIMITER $$ +CREATE FUNCTION company_get_name(in_id INT(11)) RETURNS VARCHAR(254) DETERMINISTIC + BEGIN + DECLARE v_ret VARCHAR(254); + SET v_ret= ''; + SELECT name INTO v_ret FROM Companies WHERE id = in_id LIMIT 1; + RETURN v_ret; + END $$ +DELIMITER ; \ No newline at end of file -- 2.39.2