I am looking for T-SQL code to list all tables in all databases in SQL Server (at least in SS2005 and SS2008; would be nice to also apply to SS2000). The catch, however, is
I'm pretty sure you'll have to loop through the list of databases and then list each table. You should be able to union them together.