Pass value into a procedure and insert it to a table : Insert Statement « Transact SQL « SQL Server / T-SQL Tutorial






5> create table Billings (
6>     BankerID           INTEGER,
7>     BillingNumber      INTEGER,
8>     BillingDate        datetime,
9>     BillingTotal       INTEGER,
10>     TermsID            INTEGER,
11>      BillingDueDate     datetime ,
12>      PaymentTotal       INTEGER,
13>      CreditTotal        INTEGER
14>
15>  );
16>  GO
1>
2>
3>
4> CREATE PROC usp_AddBillings
5> @ClassIDval int
6> AS
7> INSERT Billings (BankerID)VALUES (@ClassIDval)
8> GO
1>
2> EXEC usp_AddBillings 2
3> GO

(1 rows affected)
1>
2>
3> drop PROC usp_AddBillings;
4> GO
1> drop table Billings;
2> GO








20.15.Insert Statement
20.15.1.Creation Script for the usp_EmployeeInsert Stored Procedure
20.15.2.use a stored procedure to insert data to a table
20.15.3.Pass value into a procedure and insert it to a table
20.15.4.Using the INSERT DEFAULT VALUES Statement
20.15.5.Procedure for bulk insert