Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.server -> Re: How to check constraints on Table - DISPLAY
Cecil D'Souza wrote:
>
> Hi guys;
>
> I want to see the description of my tabels with the constraints. How do I
> achieve this.
> I have checked all the damn manuals and am stuck. Pl help.
>
> Thank you to Oracle for the fantastic documentation.
>
> Cecil
Try this SQL statement
SELECT B.COLUMN_NAME,B.CONSTRAINT_NAME,DECODE(A.CONSTRAINT_TYPE, 'C',
'CHECK/NOT NULL',
'P', 'PRIMARY KEY', 'R', 'FOREIGN KEY', 'U', 'UNIQUE
KEY')CONSTRAINT_TYPE,a.search_condition
FROM user_constraints A, user_cons_columns B
WHERE A.OWNER = B.OWNER
AND A.CONSTRAINT_NAME = B.CONSTRAINT_NAME AND A.TABLE_NAME = B.TABLE_NAME AND A.TABLE_NAME = UPPER('&TABLE')
Hope this helps
AMARENDRA
-- ****************************************************************************** AMARENDRA B NETTEM 5039 N E River Road, Apt. 1A Certified Oracle DBA NORRIDGE, IL 60656 Whittman-Hart Inc., 311 South Wacker Drive, Suite 3500 Chicago, IL 60606. Ph.No. (708) 583 9870 (H) (312) 913 6758 (W) E-mail:nettama_at_charlie.cns.iit.edu, anettem_at_whittman-hart.com Homepage: http://www.iit.edu/~nettama **************************************************************************** Opinions are mine and do not necessarily reflect those of Whittman-hart Inc.Received on Mon Oct 13 1997 - 00:00:00 CDT
![]() |
![]() |