Results 1 to 3 of 3
  1. #1
    Join Date
    Mar 2007
    Posts
    29

    Thumbs up Unanswered: A column with check constraint

    Hi Experts,

    Can a column with the check constraint accept null values?

    The column is declared as null while creating the table. The constraint is added to the column using alter table.

    Kindly suggest me on this.

    Regards,
    Shiya
    Last edited by shiya; 02-27-08 at 00:15.

  2. #2
    Join Date
    May 2005
    Location
    South Africa
    Posts
    1,365
    Provided Answers: 1
    Which part is unclear to you?
    Transact-SQL® User's Guide
    Chapter 8 Creating Databases and Tables
    Specifying check constraints
    ...check constraints do not override column definitions,
    you cannot use a check constraint to prohibit null values if the column definition permits them...

  3. #3
    Join Date
    Mar 2007
    Posts
    29

    Smile

    Thanks...

    I am clear now...

    you cannot use a check constraint to prohibit null values if the column definition permits them...

    Regards,
    Shiya
    Last edited by shiya; 02-27-08 at 00:12.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •