I need to get a list of tables in a database

  • 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.

  • I think this will work for you

    SELECT * FROM sys.sysobjects S

    WHERE type = 'U'

    AND name LIKE 'GEN%'

  • Thank you.

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply