0

I have one Business(Database) where there is 20 tables and I need to fetch all the column name with the data type and table constraint(PK and FK ) only in both SQL and Oracle server and save it in a csv for analysis . SQL Server :

SELECT TABLE_CATALOG,TABLE_SCHEMA,TABLE_NAME, COLUMN_NAME, DATA_TYPE 
FROM INFORMATION_SCHEMA.COLUMNS

Oracle :

describe <table_name>

Not sure how to fetch it once for the database fetching all table in one go instead of putting one table at a time

MT0
  • 143,790
  • 11
  • 59
  • 117
  • Cross site dupe candidate: [Information_Schema on oracle?](https://dba.stackexchange.com/q/224083/140734) – Thom A May 12 '21 at 12:25
  • Use the same query as the linked duplicate, just also fetch the `owner`, `table_name` and `data_type` columns (or use `*` to get all the columns from that data dictionary table). – MT0 May 12 '21 at 12:36

0 Answers0