Skip to content

Instantly share code, notes, and snippets.

@garethstokes
Created October 17, 2011 05:53
Show Gist options
  • Save garethstokes/1292014 to your computer and use it in GitHub Desktop.
Save garethstokes/1292014 to your computer and use it in GitHub Desktop.
make this idompotent
alter table [catalog] add UseServerTime bit;
update [catalog] set [UseServerTime] = 0;
go;
@sugendran
Copy link

USE db

IF EXISTS(select * from sys.all_columns ac inner join sys.tables t on ac.object_id = t.object_id where t.name = 'catalog' and ac.name = 'UseServerTime')
BEGIN
alter table [catalog] add UseServerTime bit;
update [catalog] set [UseServerTime] = 0;
END

@izevaka
Copy link

izevaka commented Oct 21, 2011

Seeing you two talking in SQL to each other is kind of amusing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment