|
Cry How to...Add a column to a table unless it already existsTo add a column to a SQL Server database table, checking first that the column does not already exist:
where: <table_name> is the name of the table, <column_name> is the name of the column and <column_definition> is the definition of the column used when creating the column. For example:
These notes have been tested against SQL Server 7 and SQL Server 2000. |