Question : show tables and their fields in tsql?

Hi
What is the syntax to show tables in TSQL.  Also what is the syntax to show the fields within the tables

Thanks

Greg

Answer : show tables and their fields in tsql?

or may be you would like to use join.

select t.Table_Schema,t.table_name,c.column_name
from INFORMATION_SCHEMA.TABLES t join INFORMATION_SCHEMA.COLUMNS c
on t.table_name=c.table_name
--where t.TABLE_NAME='YourTableName'


if you want to filter data, remove the comment from WHERE clause and put table_name there.
Random Solutions  
 
programming4us programming4us