各位帮小弟个忙 帮我看看下面这个关于Leaveword表的存储过程有什么问题 谢谢好心人
CREATE PROCEDURE Pr_GetLeaveword
AS
SELECT*
FROM Leaveword
ORDER BY CreateTime DESC
CREATE PROCEDURE Pr_GetSingleLeaveword
(
@LeavewordID int
)
AS
SELECT Leaveword.*
FROM Leaveword
WHERE [email protected]
CREATE PROCEDURE Pr_AddLeaveword
(
@Title varchar(100),
@Body varchar(200)=NULL
)
AS
INSERT INTO
Leaveword(Title,Body,CreatTime)
VALUES (@Title,@Body,GetDate())
RETURN @@Identity
CREATE PROCEDURE dbo.Pr_DeleteLeaveword
(
@LeavewordID int
)
AS
DELETE Leaveword
WHERE [email protected]
------解决方案--------------------
CREATE PROCEDURE Pr_AddLeaveword
(
@Title varchar(100),
@Body varchar(200)=NULL,
@id int output
)
AS
INSERT INTO
Leaveword(Title,Body,CreatTime)
VALUES (@Title,@Body,GetDate())
SET @id = @@Identity
return @id
------解决方案--------------------
CREATE PROCEDURE Pr_GetLeaveword
AS
SELECT *
FROM Leaveword
ORDER BY CreateTime DESC