declare xcursor cursor for
select name from sysobjects where xtype='u'
declare @name varchar(100)
open xcursor
fetch xcursor into @name
while @@fetch_status=0
begin
exec('alter table '+@name+' add newcol int identity(1,1)')
fetch xcursor into @name
end
close xcursor
deallocate xcursor