rightfield
SSCrazy
Points: 2418
More actions
September 16, 2009 at 12:14 pm
#136045
I need to make an update in all tables that start with 'gen_%' in a particular database. What system table will give me that list so I can loop through and use each table name in an update statement. Thank you. Warm regards.
matt6288
SSCertifiable
Points: 5058
September 16, 2009 at 12:18 pm
#1054659
I think this will work for you
SELECT * FROM sys.sysobjects S
WHERE type = 'U'
AND name LIKE 'GEN%'
September 16, 2009 at 12:21 pm
#1054662
Thank you.
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply