我想为此查询创建dyanmic存储过程。以及如何在通话过程中传递品牌中的多重价值。我想在调用程序时传递多个品牌。请帮忙。
select product_name,status,brand from spec_abc where
status='1' and brand in ('apple','samsung','oppo','LG')
limit 10;
答案 0 :(得分:1)
当然,但为什么?
DROP PROCEDURE IF EXISTS test;
DELIMITER //
CREATE PROCEDURE test()
BEGIN
select product_name,status,brand from spec_abc where
status='1' and brand in ('apple','samsung','oppo','LG')
limit 10;
END;
//
DELIMITER ;
需要10秒才能观看文档:
https://dev.mysql.com/doc/connector-net/en/connector-net-tutorials-stored-procedures.html