-1
工作如何存儲在圖像1可變MySQL的選擇情況下不得使用功能
BEGIN
DECLARE image1 VARCHAR(250);
select case when (
(
select COUNT(*)
from profile_images
where building_id = bid
and contractor_id = cid
) > 0
) then (
select distinct (image)
into image1
from profile_images
where building_id = bid
and contractor_id = cid limit 1
) else (
select distinct (image)
into image1
from profile_images
where contractor_id = cid limit 1
)
END
RETURN image1;
END
答案是有用 –
其根據本地服務器,但主服務器的工作有消息ishows錯誤「 #2014 - 命令不同步;現在無法運行此命令「@wchiquito –
@samjadps:檢查[B.5.2.14命令不同步](https://dev.mysql.com/doc/refman/ 5.7/EN /命令-外的sync.html)。 – wchiquito