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