SqlServer的存储过程如何写成MySQL的存储过程,跪求!
有一个SqlServer的存储过程,由于对MySQL不是很熟悉,不知道如何写成MySQL的存储过程,求助!SqlServer的存储过程如下:ALTERPROCEDUREI...
有一个SqlServer的存储过程,由于对MySQL不是很熟悉,不知道如何写成MySQL的存储过程,求助!SqlServer的存储过程如下:
ALTER PROCEDURE Insert_U(
@UNo varchar(30),
@FunctionID int,
@UStopTime datetime
)
as
begin
if Exists(Select * From UserBehav Where UNo=@UNo and FunctionID = @FunctionID)
UPDATE UserBehav
SET UStopTime= @UStopTime
Where UNo=@UNo and FunctionID = @FunctionID
ELSE
INSERT INTO UserBehav (UNo, FunctionID,UStopTime)
VALUES(@UBMNo, @FunctionID,@UStopTime)
end 展开
ALTER PROCEDURE Insert_U(
@UNo varchar(30),
@FunctionID int,
@UStopTime datetime
)
as
begin
if Exists(Select * From UserBehav Where UNo=@UNo and FunctionID = @FunctionID)
UPDATE UserBehav
SET UStopTime= @UStopTime
Where UNo=@UNo and FunctionID = @FunctionID
ELSE
INSERT INTO UserBehav (UNo, FunctionID,UStopTime)
VALUES(@UBMNo, @FunctionID,@UStopTime)
end 展开
1个回答
2014-09-10
展开全部
懒人,sorry
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询