Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Rhinorhino on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print Table Structure

Status
Not open for further replies.

dvannoy

MIS
Joined
May 4, 2001
Messages
2,765
Location
US
I am trying to print a table structure. I would like the field names and types.

If there is no way to print, can it be written to a txt file?

I searched the forum but it kept timming out..

Thanks in advance
 
Hi,

Have a look at this thread thread183-476438

Sunil
 
Thanks...I saw this already..unless I am doing something wrong this does not give me the field names and types in each table..
 
Hi,

Have u tried.... is that wht u r looking for

sp_help tblname


Sunil
 
I am trying to show a table structure on asp . I would like the field names and types and length and primary key and so on ....

I use ODBC for connect to sybase .
sql = " sp_help tablename "
I only can get this information for ODBC
tablname Name ,table Owner ,type
---------------------------------------
TableName ,user table ,dbo
(1 row affected)

But the sql statement " sp_help tablename " I use on isql
that can get all information which I want .
Includes field names and types and length and primary key and so on ....
how can I get what I want on asp which use ODBC connect to sybase ?
is there any parameter option after "sp_help" ?
like
sp_help tablename ,parameter1 ,parameter2 ??


Thanks in advance



sql = " sp_help AcntInfo " use on isql
********************************************************
Name Owner
Type
------------------------------ ------------------------------
----------------------
AcntInfo dbo
user table

(1 row affected)
Data_located_on_segment When_created
------------------------------ --------------------------
default Apr 18 2003 5:20PM
Column_name Type Length Prec
Scale Nulls Default_name
Rule_name Identity
------------------------------ ------------------------------ ------ ----
----- ----- ------------------------------
------------------------------ --------
AccCenter char 6 NULL
NULL 0 NULL
NULL 0
Currency char 3 NULL
NULL 0 NULL
NULL 0
.
.
.
.
AccName nvarchar 20 NULL
NULL 0 NULL
NULL 0
index_name index_description
index_keys
index_max_rows_per_page index_fillfactor
index_reservepagegap
-------------------- --------------------------------------------------------
-----------------------------------------------------------------------
----------------------- ---------------- --------------------
AcntInfo_PK clustered, unique located on default
AccCenter, Currency, AccTitle, AccSubTitle, Dtl
0 0 0

(1 row affected)
No defined keys for this object.
Object is not partitioned.
Lock scheme Allpages
The attribute 'exp_row_size' is not applicable to tables with allpages lock
scheme.
The attribute 'concurrency_opt_threshold' is not applicable to tables with
allpages lock scheme.

exp_row_size reservepagegap fillfactor max_rows_per_page identity_gap
------------ -------------- ---------- ----------------- ------------
0 0 0 0 0

(1 row affected)
concurrency_opt_threshold
-------------------------
0
(return status = 0)
********************************************************
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top