2013年12月18日 星期三

mssql-procedure



CREATE PROCEDURE mySP
AS
BEGIN
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT * from FilteredAccount
END

To modify a stored procedure we use the ALTER command as follows:
ALTER PROCEDURE mySP
AS
BEGIN
SET NOCOUNT ON;
-- Insert statements for procedure here
SELECT name from FilteredAccount
END
To delete a stored procedure we use the DROP command as follows:
DROP PROCEDURE mySP
To execute a stored procedure we use the EXEC command as follows:
EXEC mySP


沒有留言:

張貼留言