Using T-SQL to write a stored procedure
no vote
Application background Introduce the basic usage of T-SQL stored procedure, for beginners learning to use. A stored procedure is a set of Transact-SQL statements precompiled, as a unit of storage on the server and executed on the server. The stored procedure can take input, output parameters, return values. With the advantages of stored procedures are as follows:(1) the safety of stored procedure can force the application, can prevent SQL injection attacks.(2) the stored procedure can greatly reduce network traffic. (3) the stored procedure is registered in the server, the implementation of high efficiency.(4) the storage process greatly improves the maintainability of the application and the design efficiency. Key Technology In the SQL defined in Server 2008, execute, modify the stored procedure. The use of create procedure or create proc stored procedure, use exec or execute to execute a stored procedure, the use of alter proc or alter pro