例如,参数可以是INT
类型, FLOAT
或DATETIME
等。
You can add something the param as a varchar and then convert it to appropriate type using a CASE structure and then use it in your procedure,of sort:
BEGIN
DECLARE v VARCHAR DEFAULT "NULL";
CASE v
WHEN 'INT' THEN CONVERT(v AS INT);
WHEN 'FLOAT' THEN CONVERT(v AS FLOAT);
ELSE
BEGIN
END;
END CASE;
END;
您的意思是像@Qty int
这样的输入参数吗?
每次您必须手动编辑存储功能以更改数据类型时。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.