Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT ATC.TABLE_NAME Tabla, COUNT(DISTINCT ATC.COLUMN_NAME) NUM_Columnas, COUNT(DISTINCT AC.CONSTRAINT_TYPE), MAX(AT.NUM_ROWS) NUM_TUPLAS
- FROM ALL_TAB_COLS ATC, ALL_CONSTRAINTS AC, ALL_TABLES AT
- WHERE SUBSTR(ATC.TABLE_NAME, 1, 1) BETWEEN 'A' AND 'K'
- AND ATC.TABLE_NAME IN ('BARES', 'BEBEDORES', 'BEBIDAS', 'FRECUENTAN', 'FRECUENTAN', 'GUSTAN', 'SIRVEN', 'TIPO_BEBIDA')
- AND ATC.TABLE_NAME = AC.TABLE_NAME
- AND AT.TABLE_NAME = AC.TABLE_NAME
- AND AC.CONSTRAINT_TYPE = 'P' GROUP BY ATC.TABLE_NAME;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement