DISPLAY STRUCTURE with SQL

Post Reply
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

DISPLAY STRUCTURE with SQL

Post by Jack »

Hi,
What is the equivalent of DISPLAY STRUCTURE for an access or MS SQL database ?

Thanks .
User avatar
Rick Lipkin
Posts: 2397
Joined: Fri Oct 07, 2005 1:50 pm
Location: Columbia, South Carolina USA

Re: DISPLAY STRUCTURE with SQL

Post 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
User avatar
Baxajaun
Posts: 853
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia

Re: DISPLAY STRUCTURE with SQL

Post 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
User avatar
Baxajaun
Posts: 853
Joined: Wed Oct 19, 2005 2:17 pm
Location: Gatika. Bizkaia

Re: DISPLAY STRUCTURE with SQL

Post by Baxajaun »

Code: Select all

sp_help '<TableName>'
Jack
Posts: 249
Joined: Wed Jul 11, 2007 11:06 am

Re: DISPLAY STRUCTURE with SQL

Post by Jack »

Thanks
This code works good !

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