How to create default constraint over column in a Table

This is a handy script, for creating default constraint over column in a Table


ALTER TABLE Employee
ADD CONSTRAINT DF_Employees_Name
DEFAULT 'UNKNOWN' FOR Name


Comments

Author: Kapil Dhawan18 Jun 2008 Member Level: Gold   Points : 2

Hello
Nice piece of code
Thanks for sharing your knowledge with us.
I hope to see more good code from your side
This code will help lots of guys
Thanks to you
Regards,
Kapil

Author: Shivshanker Cheral18 Jun 2008 Member Level: Gold   Points : 0

Thanks for sharing

Author: Bunty27 Jun 2008 Member Level: Gold   Points : 2

Hi,

Ausum code to create a default constraint on a column of a table.

This code will be really useful for each and everyone in this forum.

Keep posting such useful information.

Thanks for sharing and upgrading my knowledge.

Thanks and Regards
S.S.Bajoria



  • Do not include your name, "with regards" etc in the comment. Write detailed comment, relevant to the topic.
  • No HTML formatting and links to other web sites are allowed.
  • This is a strictly moderated site. Absolutely no spam allowed.
  • Name:
    Email: