Choose your database:
AnySQL
MySQL
MS SQL Server
PostgreSQL
SQLite
Firebird
Oracle
SQL Anywhere
DB2
MaxDB

Subscribe to our news:
Partners
Testimonials
Alex Torin: "Several months ago I downloaded the trial versions of several Microsoft SQL administration tools that I was able to find using google. I had considerable trouble with most of them crashing... but using your product I was able to isolate and solve the problems I was having. I decided to add it to my toolkit and have recommended it to a few others".
Kevin Settler: "If you need the job done right and on time, do it with MS SQL Maestro on your team. The software is a pleasure for us. SQL Maestro Group do excellent work and are dedicated to producing products that all can be proud of".

More

Add your opinion

MS SQL Maestro online Help

Prev Return to chapter overview Next

Default constraints

Default Constraints can be used to provide values for a new column in the existing rows of data. SQL Server defaults provide data to columns and user-defined data types when no other data is available on an INSERT statement execution. Constraints allow you to define the way Microsoft® SQL Server automatically enforces the integrity of a database. Constraints define rules regarding the values allowed in columns and are the standard mechanism for enforcing integrity.

 

 

 

 

allows you to add a new default constraint or edit an existing one. It is available from Table Editor, or from the corresponding nodes of the explorer tree.
 

The Default Constraint Properties window allows you to set the constraint name, enter some optional text describing it, select a field to define the default constraint on, and also to specify the default value.
 

 

Note: the name of the object must be unique among all the object names in its container. Moreover, all the objects that are source of data need unique names among themselves. You can use any identifier that is allowed by Microsoft SQL server.

 

Note: default constraints cannot be added to columns that have a timestamp data type, an Identity property, an existing default constraint, or a bound default. If the column has an existing default constraint, the default must be dropped before the new default can be added.

 

See also: Defaults



Prev Return to chapter overview Next