declare @tablename varchar(100)
declare crs cursor for
select name from sysobjects where xtype='U'and name<>'dtproperties'
open crs
fetch next from crs into @tablename
while(@@fetch_status<>-1)
begin
exec ('alter table '+@tablename+' ADD [ID] INT identity(1,1)')
fetch next from crs into @tablename
end
close crs
deallocate crs