Jasinski Technical Wiki

Navigation

Home Page
Index
All Pages

Quick Search
»
Advanced Search »

Contributor Links

Create a new Page
Administration
File Management
Login/Logout
Your Profile

Other Wiki Sections

Software

PoweredBy

Page History: Schema Change Scripts - SQL Server

Compare Page Revisions



« Older Revision - Back to Page History - Newer Revision »


Page Revision: Thu, Nov 01, 2012, 9:30 AM


Drop Column

if COL_LENGTH('TableName','ColumnName') is not null
    alter table dbo.TableName drop column ColumnName

Add Columns

alter table dbo.TableName ADD
     ColumnName  int      not null identity(1,1)
    ,ColumnName2 date     not null

ScrewTurn Wiki version 3.0.1.400. Some of the icons created by FamFamFam. Except where noted, all contents Copyright © 1999-2024, Patrick Jasinski.