Page 1 of 1

DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:24 pm
by Jack
Hi,
What is the equivalent of DISPLAY STRUCTURE for an access or MS SQL database ?

Thanks .

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:49 pm
by Rick Lipkin
Jack

There are several free tools for both Access and Sql Server .. Ms Access is part of MS Office professional and comes with everything you need to create databases,tables, and to print and modify structures. Ms Sql Server has its own Microsoft tools called MS Sql Studio and is part of the Database installation.

Some free tools include :

Sql Server : Toad http://www.toadworld.com/products/toad- ... fault.aspx
Access : FiveDbu designed by Antonio is good
Alex Noland has a suite of free Database tools http://www.alexnolan.net/software/mdb_viewer_plus.htm

Rick Lipkin

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:51 pm
by Baxajaun
Hi Jack,

you could try:

Code: Select all

select *
from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME='tableName'
or

Code: Select all

sp_columns '<table name>'
Regards

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:52 pm
by Baxajaun

Code: Select all

sp_help '<TableName>'

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 1:39 pm
by Jack
Thanks
This code works good !

select *
from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME='tableName'