locked
ANSI NULL setting, at table recreating in SQL Management

    Question

  • Hello again!

    i need to change number of decimal places in one column of the table, so i tried to do this in SQL MANAGEMENT studio,

    but at the saving moment - it gives me warning something like this:

    "Table has been created with ANSI NULL off, and will be recreated with ANSI NULL on",

    i would definitely not go ahead with that and i cant find where to set it to leave ANSI NULL like it is?

    any way this could be done?

    anyway - my main problem is nut with ANSI NULL setting - i just want to change number of decimal places from 2 to 3 in one of the columns,

    bzut it wont let me do this with this....

    Thanks in advance!

     

    Friday, April 06, 2012 10:57 AM

Answers

  • i would definitely not go ahead with that and i cant find where to set it to leave ANSI NULL like it is?

    any way this could be done?

    anyway - my main problem is nut with ANSI NULL setting - i just want to change number of decimal places from 2 to 3 in one of the columns,

    Why do you want to retain the ANSI_NULLS OFF setting?  Do you have a check constraint that relies on that setting?  ANSI_NULLS OFF has been deprecated for some time.  In my experience, ANSI_NULLS OFF is most often set by accident than intentionally.

    You can use ALTER TABLE instead of the GUI if you want to change the column and retain the setting without recreating the table.  For example:

    ALTER TABLE dbo.MyTable
    ALTER COLUMN MyCurrencyColumn decimal(18, 4) NOT NULL;


    Dan Guzman, SQL Server MVP, http://weblogs.sqlteam.com/dang/

    Friday, April 06, 2012 5:43 PM