All pastes #732769 Raw Edit

Something

public text v1 · immutable
·published 2007-10-11 07:37 UTC
rendered paste body
SELECT Column_Name, Data_Type, Data_Length, Nullable, AD_Table_ID,
       uc.DATA_PRECISION, uc.DATA_SCALE, DATA_DEFAULT, Table_Name, t.EntityType
FROM User_Tab_Columns uc, AD_Table t
WHERE uc.Table_Name=UPPER(t.TableName) AND NOT EXISTS
        ( SELECT *
          FROM AD_Table t, AD_Column c
          WHERE t.AD_Table_ID=c.AD_Table_ID 
          AND uc.Table_Name=UPPER(t.TableName)
          AND uc.Column_Name=UPPER(c.ColumnName)
        )
AND(v_Record_ID=t.AD_Table_ID OR v_Record_ID IS NULL)
ORDER BY uc.COLUMN_ID