Today I am going to show you how do we obtain schema information in SQL Server 2005/2008. If you want to select all table names from a specific schema you need to use sys.tables and sys.schemas tables. For example I wanted to select all tables from schema bob:
|
|
Another way to do this is by using INFORMATION_SCHEMA view:
|
|
Lets say now that we want to select all columns from a specific table the name of which matches ‘%empl%’
|
|