Odd formatting, Create table with IDENTITY

Here is what I am getting with the released version when I format a create table statement that has an identity column. I would expect to have the NOT NULL and trailing comma on the same line as the rest of the column information.

CREATE TABLE [docsadm].[APD_ADR]
(
[THE_DATE] [datetime] NULL,
[SITE_ELEMENT_KEY] [char](10) NOT NULL,
[AUTO_KEY] [int] IDENTITY(1, 1)
NOT NULL,
[TIME_STAMP] [binary](8) NULL
)

Thanks,
Tim
Denver, CO

Comments

  • Eddie DEddie D Posts: 1,800 Rose Gold 5
    Hi

    Thank you for your post.

    I have recreated your observations and tried changing a small number of options to no avail.

    I will check with our developers and get back to you.

    Best Regards
    Eddie
    Eddie Davis
    Senior Product Support Engineer
    Redgate Software Ltd
    Email: support@red-gate.com
  • Hi,

    The current version of layout has a single rule for column constraints and the optional parts of a column definition: each additional constraint is placed on a single line. This is why the NOT NULL is being placed on a line separately from the IDENTITY.

    This is intended to help out with complicated column definitions, to make it easy to pick out individual constraints at a glance. I think you have a point in that it does not look ideal for simpler definitions: we will consider refining this feature in a future version.

    Andrew.
    Andrew Hunter
    Software Developer
    Red Gate Software Ltd.
Sign In or Register to comment.