I need 4 separate SQL scripts that I can run against a database that produces specific output results.
This must be run against Oracle database.
This must use standard objects/sql, not user defined sprocs, functions, views, etc. It cannot create objects, it must just run read-only and generate the results.
Please see attached sample (based on Northwind DB).
1-Databases:
Get a list of all databases
2-Tables:
Get a list of all tables and views of the current database. This will include the table/view schema (namespace) as well.
3-Relations:
Output format represents the list of relations constraints between tables.
4-Columns:
Output format is hierarchy where PARENT_ID IS NULL for the tables/views, the columns of the table will have that table's ID.
ID is a rownumber.
IS_NULLABLE is either Y (for Yes,), N (for No), Y-d (if yes and has a default), N-d (if no and has a default)
IS_ID is if the column is an identity
IS_vPK and IS_vFK are always blank ''.
IS_PK and IS_FK and contain the name of the [login to view URL] that is referenced as the primary/foreign key
COLUMN_COMPUTED is the computed column formula
If you have any questions, please let me know.