Somethnig strange when using script table as

  • When I go to script table as , create to , new query editor window,

    I get the following :

    USE [00000_Reprint_Test]

    GO

    /****** Object: Table [dbo].[Inkref] Script Date: 10/05/16 9:08:23 AM ******/

    SET ANSI_NULLS ON

    GO

    SET QUOTED_IDENTIFIER ON

    GO

    SET ANSI_PADDING ON

    GO

    CREATE TABLE [dbo].[Inkref2](

    [OEL] [varchar](8000) NULL,

    [codeline] [varchar](8000) NULL,

    [Line01] [varchar](75) NULL,

    [Line02] [varchar](75) NULL,

    [Line03] [varchar](75) NULL,

    [Line04] [varchar](75) NULL,

    [Line05] [varchar](75) NULL,

    [Line06] [varchar](75) NULL,

    [Line07] [varchar](75) NULL,

    [Line08] [varchar](75) NULL,

    [Line09] [varchar](75) NULL,

    [Line10] [varchar](75) NULL,

    [IMB_ADR] [varchar](500) NULL,

    [IMB_ADR_EC] [varchar](500) NULL,

    [MailPiece] [int] NULL,

    [Pallet_Nbr] [varchar](500) NULL,

    [Tray_Nbr] [varchar](500) NULL,

    [Bundle_Nbr] [varchar](500) NULL,

    [Tray_Break] [varchar](1) NOT NULL,

    [Pack_Break] [varchar](1) NOT NULL,

    [Signoff] [varchar](1) NOT NULL,

    [SlipSheet] [varchar](1) NOT NULL,

    [Country] [varchar](1) NOT NULL,

    [Salutation] [varchar](50) NULL

    ) ON [PRIMARY]

    SET ANSI_PADDING OFF

    ALTER TABLE [dbo].[Inkref] ADD [PageBreak] [varchar](36) NOT NULL

    ALTER TABLE [dbo].[Inkref] ADD [MailStream] [float] NULL

    SET ANSI_PADDING ON

    ALTER TABLE [dbo].[Inkref] ADD [InternalCode] [varchar](10) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W01] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W02] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W03] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W04] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W05] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W06] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W07] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W08] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W09] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W10] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W11] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W12] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W13] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W14] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W15] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W16] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W17] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W18] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [W19] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [w20] [varchar](8000) NULL

    ALTER TABLE [dbo].[Inkref] ADD [ID] [varchar](8000) NULL

    GO

    SET ANSI_PADDING OFF

    GO

    Why am I getting all that alter table add column stuff for the create table script?

  • You have 2 columns that have the ANSI Padding turned off in the middle of the table.

  • Ok. What exactly is ANSI padding?

  • SET ANSI_PADDING (Transact-SQL)

Viewing 4 posts - 1 through 3 (of 3 total)

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