Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Finding constraints in existing database
Using my freeware SQLPlusPlus you could easily list constraints (and
other
objects) with simple commands in SQL*Plus. For example to list all
contraints for the current user, I shall do the following:
SQL> EXEC S.H('LSTCON') -- Display help about LSTCON command
| ----------------------------------------------------------------------
SQL> EXEC S.LSTCON -- Execute LSTCON command
| TEST DEPT DEPT_PRIMARY_KEY
PRIMARY KEY
| TEST DEPT SYS_C001257
CHECK
| TEST EMP EMP_FOREIGN_KEY
FOREIGN KEY
| TEST EMP EMP_PRIMARY_KEY
PRIMARY KEY
| TEST EMP EMP_SELF_KEY
FOREIGN KEY
| TEST EMP SYS_C001259
CHECK
| TEST EMP SYS_C001260
CHECK
| TEST SQLPP_HELP SYS_C001241
CHECK
| TEST SQLPP_HELP SYS_C001242
CHECK
| TEST SQLPP_HELP SYS_C001243
CHECK
| TEST SQLPP_HELP SYS_C001244
CHECK
| TEST SQLPP_HELP SYS_C001245
CHECK
| TEST SQLPP_HELP SYS_C001246
CHECK
| TEST SQLPP_OUTPUT SYS_C001237
CHECK
| TEST SQLPP_OUTPUT SYS_C001238
CHECK
| TEST SQLPP_OUTPUT SYS_C001239
CHECK
| TEST SQLPP_OUTPUT SYS_C001240
CHECK
regards,
M. Armaghan Saqib
+---------------------------------------------------------------| 2. SQL Link for XL => Integrate Oracle with XL
| 1. SQL PlusPlus => Add power to SQL Plus command line
+---------------------------------------------------------------
+---------------------------------------------------------------
Kevin Bass <akil1_at_mindspring.com> wrote in message
news:89ptja$rf2$1_at_nntp9.atl.mindspring.net...
> Try using DBA_CONSTRAINTS (if you have access to it), or
USER_CONSTRAINTS.
> Use the fields of constraint_name, owner, table_name in the WHERE
clause
for
> the table(s) that contain the constraints. > > > matthew taylor <s176226_at_student.uq.edu.au> wrote in message > news:38BF684D.2E8C1A6C_at_student.uq.edu.au... > > a while ago i discovered > > select * from USER_TABLES; > > > > and the resulting flood of information when filtered yielded allkinds
> > space etc. > > > > I'm still wading through various manuals to get the hang of thingsin
> > Oracle but I'm curious, is there a quick and easy way to find > > constraints that have been setup on a database?? ie. is it something > > like > > > > select blah from constraints_blah ??? > > > > > > Got myself all happy the other day when I jdbc connected acrossnetwork
> > to an access database, now to move onto a jdbc connection across > > webserver and do some dynamic content in web pages. > > > > > > Matthew > >
Sent via Deja.com http://www.deja.com/
Before you buy.
Received on Wed Mar 08 2000 - 21:57:59 CST