Thursday, December 1, 2011

Insert into Table with Default Values only

Sometimes we may need to insert a row into Table with Default Values and don't want to provide column list. Use below Query:

INSERT INTO CustomerMaster Default Values

If some columns do not have default values assigned than NULL will be inserted. And if there is a column with no Default value and has NOT NULL constraint, then Insert Statement will fail.

No comments:

Post a Comment