ANSI_PADDING

  • When I try to remove the “Allow NULLS” option from a tinyint field using EM I get the message:

     

    Warning: One or more existing columns have ANSI_PADDING ‘off’ and will be re-created with ANSI_PADDING ‘on’.

     

     

    Question 1: Why is this happening and what does it mean for a tinyint field?

     

     

     

    Question 2: According to BOL

     

    Warning  It is recommended that ANSI_PADDING always be set to ON.

     

    Later on in the same article we find:

     

     

    Set ANSI_PADDING to ON for varchar(n):

     

                Trailing blanks in character values inserted into varchar columns are not trimmed.”

     

     

    Set ANSI_PADDING to OFF for varchar(n):

     

    Trailing blanks in character values inserted into a varchar column are trimmed.

     

     

    It seems that from a disk space perspective OFF is the better way to go. From a  speed perspective (indexes?) ON may be better. Comments?

     

    TIA,

     

    Bill

     

     

     

  • OK, behind the magic curtain of EM is the fact that some of what it does is not magic.

    That is, sometimes what it's doing is renaming, recreating, repopulating, dropping... but all you see is the happy little busy cursor and it all looks easy.

    Try turning on the Profiler and watch what syntax is really being sent to the server (when you press the OK button) to do the table modification you're undertaking in EM.  Then it will likely become clear.

    (OK, well, actually none of what it does is magic... but don't tell Bill that I told you.)

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply