The information in this article applies to:
SUMMARYIn SQL Server versions 7.0 and later, the Transact-SQL ALTER TABLE command allows you to modify a table definition by altering, adding or dropping columns and constraints, or by disabling or enabling constraints and triggers. However, in SQL Server versions prior to 7.0, you cannot change the length or data type of an existing column or delete a column. This article explains how these additional changes can be made. MORE INFORMATION
The above table definition changes can be done in SQL Server in at
least three ways:
Given the following table definition and data:
If we wanted to expand col1 to take 15 characters and change the data type of col2 to char, the following would result:
Additional query words: Transact-SQL
Keywords : kbprg SSrvServer |
Last Reviewed: November 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |