Just as there are global stored procedures in the master database that are context sensitive to the current database, there are also global views in the master database that can query the current database. These views are owned by INFORMATION_SCHEMA.
For all table columns, try
select * from INFORMATION_SCHEMA.COLUMNS
SQL = Scarcely Qualifies as a Language