mysql存储过程,参数默认值如何写法
2个回答
展开全部
以下只是个例子
CREATE procedure test
@n1 char(10),
@n2 char(10),
@n3 char(10),
@n4 char(10),
@n5 char(10),
@n6 char(10),
@n7 char(10),
@n8 datetime,
@n9 datetime,
@n10 int
as
select * --------这部分请将传入的参数带入查询的条件中
from table1 t1,table2 t2,table3 t3
where deldate between @n8 and @n9
and t1.ponum = t2.ponum
and t2.partnum = t3.partnum
and t3.layer =@n1
GO
CREATE procedure test
@n1 char(10),
@n2 char(10),
@n3 char(10),
@n4 char(10),
@n5 char(10),
@n6 char(10),
@n7 char(10),
@n8 datetime,
@n9 datetime,
@n10 int
as
select * --------这部分请将传入的参数带入查询的条件中
from table1 t1,table2 t2,table3 t3
where deldate between @n8 and @n9
and t1.ponum = t2.ponum
and t2.partnum = t3.partnum
and t3.layer =@n1
GO
本回答被提问者和网友采纳
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询