Solved

simplest query

Posted on 2006-10-23
6
10,625 Views
Last Modified: 2010-07-16
Hi there,

  just started with sybase. pls tell me how can I get a table's description in sybase?

I know in oracle "describe 'table name'; "   does the job. how about sybase?


0
Comment
Question by:goldenrule
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 19

Expert Comment

by:grant300
ID: 17792094
sp_help tablename

Regards,
Bill
0
 

Accepted Solution

by:
PegasusAloft earned 50 total points
ID: 17804385
Select * from systable (or syscolumn) where table_name = yourtablename
0
 

Expert Comment

by:PegasusAloft
ID: 17808042
Give this a shot (if not using Sybase Central and ASE):

select A.Table_name, B.column_name,
       (Select domain_name from SYSDOMAIN where domain_id = B.domain_id) as DataType,
        B.width as DataWidth,
       (CASE Pkey
        when 'Y' then 'YES'
        else NULL
        END) as Pkey
from SYSTABLE A, SYSCOLUMN B
where B.table_id = A.table_id and A.Table_Name NOT LIKE ('SYS%')
order by Table_Name, column_id
0
Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 1

Expert Comment

by:PeretzBenRafael
ID: 17851609
PegasusAloft
    Err, what version of Sybase are you referring to?  I'm working with ASE 12.5, and there are no objects named SYSTABLE or SYSCOLUMN in any of my databases.  I just peeked.

    This reminds me: There aughtta be a rule that any post contain the Product (ASE, MYSQL, ...) and Version in which the user is working.
0
 
LVL 19

Expert Comment

by:grant300
ID: 17852448
Peretz,

ASE, any version, any database, you will find "sysobjects" and "syscolumns".

sysobjects has the tables, views, stored procs, system tables, etc in it.

syscolumns has the columns for tables, views, etc. in it.

This entire discussion is academic anyway.

Just use
sp_help tablename

Bill
0
 

Expert Comment

by:PegasusAloft
ID: 17852898
sp_help apparently is not supported under either ASA 8 or 9 ("error: Transact-SQL feature not supported).

Just my .02 cents
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

After hours on line I found a solution which pointed to the inherited Active Directory permissions . You have to give/allow permissions to the "Exchange trusted subsystem" for the user in the Active Directory...
Check out this step-by-step guide for asking an anonymous question on Experts Exchange.
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…
Suggested Courses

732 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question