.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Sql Server >> Post New QuestionBookmark and Share Subscribe to Forum

What is default constraint? Give an example

Posted By: Ramesh P     Posted Date: October 29, 2010    Points:2   Category :Sql Server
What is default constraint? Give an example

Responses
Author: Syed Shakeer Hussain             
Posted Date: October 29, 2010     Points: 5   

Hi,

The DEFAULT constraint is used to insert a default value into a column.

The default value will be added to all new records, if no other value is specified


http://www.w3schools.com/sql/sql_default.asp

Author: Deco             
Posted Date: October 29, 2010     Points: 5   

Default constraint is set to the table to have a value for that column when the values are not provided during insert.

This will avoid the NULL values to be stored in the column.

We will set default value in the field like BIT.

Regards,
Deco


Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend