Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Delete Column syntax SQL Server 2000


Message #1 by BChacko@d... on Mon, 25 Nov 2002 15:26:44 -0800
Almost; there is no COLUMN keyword in this case and you need to include the
datatype (and nullability) of the column, e.g. :

	ALTER TABLE tablename ADD columnname integer NOT NULL

--
Jeff Mason              Custom Apps, Inc.
Jeff@c...


-----Original Message-----
From: BChacko@d... [mailto:BChacko@d...]
Sent: Monday, November 25, 2002 7:28 PM
To: sql language
Subject: [sql_language] RE: Delete Column syntax SQL Server 2000



what about to add a column using query analyzer??

alter table tablename
add column columnname ???????????????

Thanks!
Benny




                    "Jeff Mason"
                    <je.mason@a...       To:     "sql language"
<sql_language@p...>
                    i.com>               cc:
                                         Subject:     [sql_language] RE:
Delete Column syntax SQL Server 2000
                    11/25/2002
                    03:48 PM
                    Please respond
                    to "sql
                    language"






Oops, that should have been:

"ALTER TABLE yourtablename DROP COLUMN yourcolumnname;

Be sure any foreign key constraints are removed first, though."

--
Jeff Mason              Custom Apps, Inc.
Jeff@c...


-----Original Message-----
From: BChacko@d... [mailto:BChacko@d...]
Sent: Monday, November 25, 2002 6:27 PM
To: sql language
Subject: [sql_language] Delete Column syntax SQL Server 2000



what's the syntax to delete certain columns (not just data but the entire
column)  within a table using Query Analyzer??  Microsoft SQL Server 2000.


Thanks!
Benny












  Return to Index