• I don't say Sergiy approach is not going to work, but it's more risky. Simply you can do it without dropping the table.

    -- Steps:

    -- 1. Script the Drop and Create statements for the dependecies of column Line_Number

    -- 2. Drop the constratins, indexes on column Line_number

    -- 3.

    ALTER TABLE [dbo].[FILE_RECORD]

    ADD Line_number_archive int NULL;

    -- 4.

    DECLARE @flag bit;

    Step4:

    SET @flag = 0;

    WHILE 1 = 1

    BEGIN

    UPDATE TOP (100000) t -- test the chunks size so that updates go fast enough

    SET Line_number_archive = Line_number

    FROM [dbo].[FILE_RECORD] t

    WHERE t.Line_number_archive IS NULL AND Line_number IS NOT NULL;

    IF @@ROWCOUNT = 0

    BEGIN

    BREAK;

    END;

    END;

    BEGIN TRY

    BEGIN TRAN;

    ALTER TABLE dbo.[FILE_RECORD] DISABLE TRIGGER ALL;

    ALTER TABLE dbo.[FILE_RECORD] DROP Line_number;

    EXEC sp_rename 'dbo.FILE_RECORD.Line_number_archive', 'Line_number', 'COLUMN';

    ALTER TABLE dbo.[FILE_RECORD] ENABLE TRIGGER ALL;

    COMMIT;

    END TRY

    BEGIN CATCH

    SET @flag = 1;

    ROLLBACK;

    END CATCH;

    IF @flag = 1

    BEGIN

    GOTO Step4

    --5. Run the create/enable statements from step 1

    Additionally to consider the NULLs!, if it is NOT NULL defined than is ok.

    Igor Micev,My blog: www.igormicev.com