FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour DISPLAY STRUCTURE with SQL
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM

DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:24 PM

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

Thanks .

Posts: 2706
Joined: Fri Oct 07, 2005 01:50 PM

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:49 PM

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

Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:51 PM
Hi Jack,

you could try:

Code (fw): Select all Collapse
select *
from INFORMATION_SCHEMA.COLUMNS
where TABLE_NAME='tableName'


or
Code (fw): Select all Collapse
sp_columns '<table name>'


Regards
Posts: 990
Joined: Wed Oct 19, 2005 02:17 PM

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 12:52 PM
Code (fw): Select all Collapse
sp_help '<TableName>'
Posts: 300
Joined: Wed Jul 11, 2007 11:06 AM

Re: DISPLAY STRUCTURE with SQL

Posted: Tue Jun 09, 2015 01:39 PM

Thanks
This code works good !

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

Continue the discussion