Is there any way to retrieve oracle schema in c#? These are what I need: Tables_Name, Table Columns_Name, Primary Keys, Unique Keys, Foreign Keys
Table Names:
select * from user_tables
Table Column Names:
select * from user_tab_columns
Primary Keys, Unique Keys, Foreign Keys:
select * from user_constraints
More generally:
select * from dictionary
to see all the possible system views you can use.
If you want the actual DDL used to create the tables etc you can use dbms_metadata.get_ddl, which returns a CLOB.
For instance:
select dbms_metadata.get_ddl('TABLE','MY_TABLE') from dual;
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With