LISTING 3: Add a Timestamp Field to All User Tables Change the SELECT statement: DECLARE tnames_cursor CURSOR FOR SELECT name FROM sysobjects WHERE type = 'U' Order By Name Change the EXEC statement to perform an Alter Table: EXEC ('ALTER TABLE Pubs.DBO.' + @Objectname + ' ADD Timestamp timestamp NULL')