If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > Sybase > how to find all structures/rules of a table

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-22-11, 18:07
annaNJ annaNJ is offline
Registered User
 
Join Date: Jun 2011
Posts: 5
how to find all structures/rules of a table

Hi
I am new to sybase and may not be using the right terminologies..

before I delete table A, I did a "*select * into A_tmp from A", hence I assume I have a backup copy. then later instead of truncate table A, I drop table A, and did a "select * into A from A_tmp", I thought I have restored A,
however, I found out that A now does not have the keys and some other definition that I may not even aware...
But then I have A_prod, I like to duplicate the definition, keys, rules from A_prod to A. Questions
a. How can I find out all the definitions, keys, rules in A_prod?
b. How can I define it in A?

thanks
Reply With Quote
  #2 (permalink)  
Old 06-24-11, 12:24
pradyut.dhara pradyut.dhara is offline
Registered User
 
Join Date: May 2011
Posts: 28
Hi,

You can run system procedures sp_help & sp_depends to find out the structure & keys of the table and dependent objects like stored procedures,views,triggers etc respectively.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On