Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
rockstar283
Yak Posting Veteran
96 Posts |
Posted - 2012-10-23 : 19:58:34
|
Hi..I have lots of lots of (around 1000) tables for which I need to create a data dictionary..The create table structure is as follows:CREATE TABLE x.def_deta( attr1 NUMBER NOT NULL, attr2 VARCHAR2(30), attr3 DATE, attr4 DATE, attr5 VARCHAR2(8), attr6 NUMBER NOT NULL DEFAULT 0, CONSTRAINT cstr1 PRIMARY KEY (attr1, attr2 ) USING INDEX PCTFREE 10 INITRANS 2 MAXTRANS 255 TABLESPACE D1 LOGGING STORAGE(PCTINCREASE 0 BUFFER_POOL DEFAULT ), CONSTRAINT CSTR2 FOREIGN KEY (ATTR3) REFERENCES X.DEF_MASTER(attr_y) ON DELETE CASCADE)PCTFREE 10INITRANS 1MAXTRANS 255TABLESPACE DIAMONDLOGGINGSTORAGE(PCTINCREASE 0 BUFFER_POOL DEFAULT )ENABLE ROW MOVEMENT;From structures like this, I need create a data dictionary tabulating all the fields and other info like below:table_name attribute_namedata_type data_lengthisnull PKFK REFERENCING_TABLEREFERENCING_ATTRIBUTE DEFAULTdef_deta attr1 NUMBER NOT NULLYdef_deta attr2 VARCHAR2 30 Ydef_deta attr3 DATE Y DEF_MASTER attr_ydef_deta attr4 DATE def_deta attr5 VARCHAR2 8def_deta attr6 NUMBER NOT NULL 0Can anyone please help me to create a procedure to which I can simply feed the table structure and it will tabulate the dictionary as above..This will help me a lot and save a tonne of time..Thanks in advance |
|
|
|
|