Good day. Prompt the query to get the list of tables of user (non-system) databases in SQL Server 2008.
// Gives out all databases on the server
SELECT name FROM sys.databases
// Gives out all the tables in the database
SELECT * FROM sys.objects WHERE type in (N'U ')
There is another option SELECT * FROM INFORMATION_SCHEMA.TABLES
It is more cross-platform relative to the DBMS, since INFORMATION_SCHEMA is part of the SQL standard, but sys.objects are not.
Although not everything is there, you cannot get many things without representations from the sys schema.