CREATE OR REPLACE VIEW USER_CONSTRAINTS AS
SELECT owner,
constraint_name,
constraint_type,
table_name,
search_condition,
r_owner,
r_constraint_name,
delete_rule,
status,
deferrable,
deferred,
validated,
generated,
bad,
rely,
last_change,
index_owner,
index_name,
invalid,
view_related
FROM all_constraints
WHERE owner = 'TMS_TEST_DATA';
CREATE OR REPLACE VIEW USER_CONS_COLUMNS AS
SELECT owner, constraint_name, table_name, column_name, position
FROM all_cons_columns
WHERE owner = 'TMS_TEST_DATA';
create or replace view user_tab_columns as
select "OWNER","TABLE_NAME","COLUMN_NAME","DATA_TYPE","DATA_TYPE_MOD","DATA_TYPE_OWNER","DATA_LENGTH","DATA_PRECISION","DATA_SCALE","NULLABLE","COLUMN_ID","DEFAULT_LENGTH","DATA_DEFAULT","NUM_DISTINCT","LOW_VALUE","HIGH_VALUE","DENSITY","NUM_NULLS","NUM_BUCKETS","LAST_ANALYZED","SAMPLE_SIZE","CHARACTER_SET_NAME","CHAR_COL_DECL_LENGTH","GLOBAL_STATS","USER_STATS","AVG_COL_LEN","CHAR_LENGTH","CHAR_USED","V80_FMT_IMAGE","DATA_UPGRADED","HISTOGRAM"
from all_tab_columns
where 1=1 and owner='TMS_TEST_DATA';
SELECT owner,
constraint_name,
constraint_type,
table_name,
search_condition,
r_owner,
r_constraint_name,
delete_rule,
status,
deferrable,
deferred,
validated,
generated,
bad,
rely,
last_change,
index_owner,
index_name,
invalid,
view_related
FROM all_constraints
WHERE owner = 'TMS_TEST_DATA';
CREATE OR REPLACE VIEW USER_CONS_COLUMNS AS
SELECT owner, constraint_name, table_name, column_name, position
FROM all_cons_columns
WHERE owner = 'TMS_TEST_DATA';
create or replace view user_tab_columns as
select "OWNER","TABLE_NAME","COLUMN_NAME","DATA_TYPE","DATA_TYPE_MOD","DATA_TYPE_OWNER","DATA_LENGTH","DATA_PRECISION","DATA_SCALE","NULLABLE","COLUMN_ID","DEFAULT_LENGTH","DATA_DEFAULT","NUM_DISTINCT","LOW_VALUE","HIGH_VALUE","DENSITY","NUM_NULLS","NUM_BUCKETS","LAST_ANALYZED","SAMPLE_SIZE","CHARACTER_SET_NAME","CHAR_COL_DECL_LENGTH","GLOBAL_STATS","USER_STATS","AVG_COL_LEN","CHAR_LENGTH","CHAR_USED","V80_FMT_IMAGE","DATA_UPGRADED","HISTOGRAM"
from all_tab_columns
where 1=1 and owner='TMS_TEST_DATA';
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29439655/viewspace-1372410/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29439655/viewspace-1372410/