oracle-databasesystem-tables

Ms Sql sys tables equivelant in Oracle


I could not find all tables equivalent in oracle. Such as;

sys.index_columns
sys.columns
sys.foreign_key_columns

Is there any list to find out these table names? We have several queries in mssql and they are needed to be convert for oracle.


Solution

  • You are looking for the Oracle Data Dictionary.

    MS SQL                      Oracle
    ------------------------    ------------------------------------------
    sys.index_columns           user_indexes      and  user_ind_columns
    sys.columns                 user_tab_cols
    sys.foreign_key_columns     user_constraints  and  user_cons_columns
    

    Instead of user_ (which is restricted to objects in your own schema), you could also use all_ for all objects you have access to or dba_ for all objects in the database (provided you have DBA authorisation).