order of columns

Tech-Archive recommends: Speed Up your PC by fixing your registry

From: Bonj (Bonj_at_discussions.microsoft.com)
Date: 10/05/04


Date: Tue, 5 Oct 2004 00:35:02 -0700

does anyone know, is it possible in T_SQL to do "alter table add [newcolumn]"
but specify what order the column goes in, i.e. tell SQL server what column I
want it to go before?
You can do it with enterprise manager so there must be a way of doing it via
SQL.



Relevant Pages

  • Re: ADO error
    ... SQL Server doesn't allow it. ... SQL Server is not fully ANSI 92 ... statement - with ALTER TABLE ... ... ADD you just specify the column ...
    (microsoft.public.data.ado)
  • Re: ADO error
    ... another dig around shows that SQL Server should handle it as optional. ... While the ANSI 92 standard defines the keyword COLUMN after the ADD as ... statement - with ALTER TABLE ... ... ADD you just specify the column ...
    (microsoft.public.data.ado)
  • Re: Problem altering table and adding a default
    ... ALTER TABLE dbo.Test_tbl ADD Notnull_col1 charNOT NULL ... SQL Server does not allow that - you can only add nullable columns. ... After you add a new column in Enterprise Manager, uncheck Allow Nulls, bind the uder- ... Start Profiler and perform a new trace. ...
    (microsoft.public.sqlserver.server)
  • Re: Problem altering table and adding a default
    ... SQL Server does not allow that - you can only add nullable ... > After you add a new column in Enterprise Manager, uncheck Allow Nulls, ... the ALTER TABLE statement above will pass to the SQL Server ... > 4) Start Profiler and perform a new trace. ...
    (microsoft.public.sqlserver.server)
  • Re: FTI, Searching and other Filters
    ... No matter what I specify for a search condition, ... "SQL SERVER DBA"') ... Remove the FTI from the table. ... Add an OfficeID column to the table and populate it. ...
    (microsoft.public.sqlserver.fulltext)