Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: What is wrong ?
As you didn't post the error message it is impossible to help you.
Did you want us to just guess?
Or do they charge you more if you post more characters? <g>
Daniel Morgan
Josef wrote:
> Hi,
>
> i am trying to create select query. the query should include
> all columns of a table, table name, column_name of the constraint,
> constraint name,constraint type.
>
> some thing is wrong is in my query !!!!
>
> SELECT DISTINCT ALL_CONS_COLUMNS.COLUMN_NAME
> "ALL_CONS_COLUMNS.COLUMN_NAME",
> ALL_TAB_COLUMNS.TABLE_NAME "ALL_TAB_COLUMNS.TABLE_NAME",
> ALL_TAB_COLUMNS.COLUMN_NAME "ALL_TAB_COLUMNS.COLUMN_NAME",
> CON.CONSTRAINT_NAME CONSTRAINT_NAME,
> DECODE(CONSTRAINT_TYPE,'P','PRIMARY','R','FOREIGN','C','','V','','U','')
> FROM SYS.ALL_CONS_COLUMNS ALL_CONS_COLUMNS,
> SYS.ALL_TAB_COLUMNS ALL_TAB_COLUMNS,
> SYS.ALL_CONSTRAINTS CON
> WHERE ALL_TAB_COLUMNS.TABLE_NAME = ALL_CONS_COLUMNS.TABLE_NAME (+)
> AND ALL_TAB_COLUMNS.COLUMN_NAME = ALL_CONS_COLUMNS.COLUMN_NAME(+)
> AND ALL_CONS_COLUMNS.CONSTRAINT_NAME = CON.CONSTRAINT_NAME;
>
> can someone help please ?
Received on Fri Feb 01 2002 - 10:55:16 CST