Voici ses principaux champs :
Nom du champ | Type du champ | Description du champ |
column_id | Number | Numéro de la colonne. |
column_name | VarChar | Nom de la colonne. |
column_type | VarChar | Nom du type de la colonne. |
data_length | Number | Taille de la colonne. |
nullable | VarChar | Si Y, la valeur de la colonne peut être NULL. |
owner | VarChar | Nom du propriétaire de la table. |
table_name | VarChar | Nom de la table. |
SELECT
b.owner,
'',
b.tablespace_name,
b.tablename,
a.column_name,
DECODE(a.colum_type,
'BLOB', 1, 'LONG RAW', 1, 'RAW', 1,
'CHAR', 2, 'CHARACTER', 2, 'CHAR VARYING', 2, 'CHARACTER VARYING', 2, 'CLOB', 2, 'NATIONAL CHAR', 2, 'NATIONAL CHARACTER', 2,
'NATIONAL CHAR VARYING', 2, 'NATIONAL CHARACTER VARYING', 2, 'NCHAR', 2, 'NVARCHAR', 2, 'NVARCHAR2', 2, 'NCLOB', 2, 'LONG', 2,
'LONG VARCHAR', 2, 'LONG VARCHAR2', 2, 'VARCHAR', 2, 'VARCHAR2', 2,
'DATE', 3, 'TIME', 3, 'TIMESTAMP', 3,
'INT', 4, 'INTEGER', 4, 'SMALLINT', 4,
'BINARY_DOUBLE', 6, 'BINARY_FLOAT', 6,
'DECIMAL', 6, 'DECIMAL', 6, 'DOUBLE', 6, 'DOUBLE PRECISION', 6, 'FLOAT', 6, 'NUMBER', 6, 'NUMERIC', 6, 'REAL', 6,
7),
a.data_length,
DECODE(a.nullable, 'Y', 1, 0),
a.column_id,
c.comments
FROM ALL_TAB_COLUMNS a, ALL_TABLES b, ALL_COL_COMMENTS c
WHERE
a.owner=b.owner
AND a.table_name=b.table_name
AND a.owner=c.owner(+)
AND a.table_name=c.table_name(+)
AND a.column_name=c.column_name(+)
AND b.tablespace_name LIKE 'MonSchema%'
AND b.table_name LIKE 'MaTable%'
AND a.column_name LIKE 'MaColonne%'
ORDER BY b.tablespace_name, a.table_name, a.column_id;