怎样设置MYSQL局部变量
DELIMITER$$CREATEPROCEDUREsetval()BEGINDECLAREcityVARCHAR(200);SETcity='广州市';SELECTci...
DELIMITER $$
CREATE PROCEDURE setval()
BEGIN
DECLARE city VARCHAR(200) ;
SET city = '广州市';
SELECT cid,ctruename
FROM customers
WHERE caddress LIKE CONCAT('%',city,'%');
END$$
DELIMITER ;
call setval();出错data too long 展开
CREATE PROCEDURE setval()
BEGIN
DECLARE city VARCHAR(200) ;
SET city = '广州市';
SELECT cid,ctruename
FROM customers
WHERE caddress LIKE CONCAT('%',city,'%');
END$$
DELIMITER ;
call setval();出错data too long 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询