1234567891011121314151617181920212223242526272829303132333435363738394041 SELECT COLUMN_ID AS SEQ, (SELECT NVL (D.POSITION, '') FROM ALL_CONS_COLUMNS D, all_constraints E WHERE D.OWNER = UPPER ( :user_name) AND D.OWNER = A.OWNER AND D.TABLE_NAME = A.TABLE_NAME AND D.COLUMN_NAME = A.COLUMN_NAME AND D.OWNER = E.OWNER AND D.TABLE_NAME = E.TABLE_NAME AND D.CONSTRAINT_NAME = E.CONSTRAINT_NAME AND E.C..