First, introduce what is that the stored procedure stored procedure is the program written by the TRANACT-SQL language provided by SQL Server. The TRANACT-SQL language is SQL Server provides a language designed to design a database application, which is the primary programming interface between the application and the SQL Server database. It is better than the Informix-4GL language that Pro-SQL and Informix in the Oracle Database system is in the INFORMIX-4GL language. Such languages provide the following functions, allowing users to design programs that meet the reference requirements: 1), variables 2), ANSI-compatible SQL commands (such as SELECT, UPDATE ....) 3), general flow control command (if ... Else ..., while ....) 4), internal function II. Written writing crete procedure [owner.] Store process name [; program number] [(parameter # 1, ... parameter # 1024)] [with { Recompile | Encryption | Recompile, Encryption}] [for replication] AS program line where the stored procedure name cannot exceed 128 words. Up to 1024 parameters during each store (SQL Server 7.0 or higher), the method of use of the parameters is as follows: @ 参数 名 Data Type [Varying] [= Normal] [OUTPUT] There is a "@ @ @ @ @ @] "Symbol, the parameters of each stored procedure are only internal to the program, and the types of parameters are available in addition to Image, and the data types supported by other SQL Server can be used. [= Obredity] It is equivalent to setting the default value of a field when we set up a database, here is the default value for this parameter. [OUTPUT] is used to specify that the parameter is both input and output values, that is, when the stored procedure is called, if the specified parameter value is the parameters we need to enter, it also needs to be output in the results. If the item must be OUTPUT, if only the output parameter is used, you can use Cursor, and when using this parameter, you must specify the two statements of Varying and Output.