Using the INSERT DEFAULT VALUES Statement : Insert Statement « Transact SQL « SQL Server / T-SQL Tutorial






6> CREATE TABLE MyTable(
7>   ID           int          NULL IDENTITY (1, 1),
8>   EntryDate    datetime     NULL DEFAULT (GETDATE ()),
9>   Description  varchar (20) NULL
10> )
11> GO
Msg 8147, Level 16, State 1, Server J\SQLEXPRESS, Line 6
Could not create IDENTITY attribute on nullable column 'ID', table 'MyTable'.
1> INSERT MyTable DEFAULT VALUES
2>
3> drop table MyTable
4> GO
Msg 208, Level 16, State 1, Server J\SQLEXPRESS, Line 1
Invalid object name 'MyTable'.
1>








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