-
How to get the info about the table
I want to know the info of the table,includes column name,column type,etc.And I want to export the info into a xml file ,how to do?
ocean
-
Agasimani
OCP(10g/9i/8i/8)
-
How to do?
desc tablename ?I use it,but no info.and I want to know the tablename from database.
I means I want to know all the info about table,view,package,trigger,etc.and import all the info to a xml file.I want to get a data dict.
which sys table record the info about that?
ocean
-
-
Sanjay G.
Oracle Certified Professional 8i, 9i.
"The degree of normality in a database is inversely proportional to that of its DBA"
-
If your using 9i you can get the schema DDL from the DBMS_METADATA package (GET_DDL) the following link will help:
http://download-west.oracle.com/docs...eral.htm#14343
Regards
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
I want to know the info of the table,includes column name,column type,etc.And I want to export the info into a xml file ,how to do?
You said you want column name, type and I said DESC tablename. And for your info this command gives both column name and type. If you want more info, then you should specify that clearly in your post. Dont expect people to read your mind.
If you want more details then analyze the table and look into USER_TABLES view.
Agasimani
OCP(10g/9i/8i/8)
-
Getting column description
Hi
Have a look at the DBA_IND_COLUMNS
Name Null? Type
------------------------------- -------- ----
OWNER NOT NULL VARCHAR2(30)
TABLE_NAME NOT NULL VARCHAR2(30)
COLUMN_NAME NOT NULL VARCHAR2(30)
DATA_TYPE VARCHAR2(9)
DATA_LENGTH NOT NULL NUMBER
DATA_PRECISION NUMBER
DATA_SCALE NUMBER
NULLABLE VARCHAR2(1)
COLUMN_ID NOT NULL NUMBER
DEFAULT_LENGTH NUMBER
DATA_DEFAULT LONG
NUM_DISTINCT NUMBER
LOW_VALUE RAW(32)
HIGH_VALUE RAW(32)
DENSITY NUMBER
NUM_NULLS NUMBER
NUM_BUCKETS NUMBER
LAST_ANALYZED DATE
SAMPLE_SIZE NUMBER
From this table you will get column definition for any tables as a single table or a group of tables. Hope this solve your issue..
Regards
-
To get the DDL statements for tables, indexes, constraints, and views you can export the database and then import with indexfile parameter and the file (which you specify for above parameter) will have all create statements. For PL/SQL objects you can query [ALL|DBA|USER_SORUCE] views.
Another option is to use script (shell script or sql script) to generate create statements for all objects in the database.
HTH.
Shripad Godbole
OCP DBA (8,8i,9i)
"Let's document it and call it a feature."
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|