SQL Server Performance

How to remove NOT NULL Constraints.

Discussion in 'General DBA Questions' started by krajdba, Jul 14, 2005.

  1. krajdba New Member

    Hi

    How to remove NOT NULL Constraints defined for a table
    without using the Enterprise Manager.

    Thanks



    raj
  2. rajeev_id New Member

    Use this:

    alter table <Table Name>
    alter column <column Name> <datatype> null


    Rajeev Kumar Srivastava
    --ALWAYS BE POSITIVE!--
  3. satya Moderator

    NULL can be specified in ALTER COLUMN to make a NOT NULL column allow null values, except for columns in PRIMARY KEY constraints. NOT NULL can be specified in ALTER COLUMN only if the column contains no null values.

    Satya SKJ
    Moderator
    http://www.SQL-Server-Performance.Com/forum
    This posting is provided “AS IS” with no rights for the sake of knowledge sharing.

Share This Page