Listing tables, views, procedures, indices, packages, sequences, synonyms, triggers in Oracle

If you want to list tables in MySQL, you simply type the following command:

show tables

Oracle does not provide such a short cut. You have to type the following command:

select * from user_objects where object_type = 'TABLE'

The word TABLE must be uppercase. This would lisl all tables in the database. The same query could be modified slightly to list functions, procedures, sequences, view and more.

List functions

select * from user_objects where object_type = 'TABLE'

List views

select * from user_objects where object_type = 'VIEW'

List procedures

select * from user_objects where object_type = 'PROCEDURE'

List indices

select * from user_objects where object_type = 'INDEX'

List packages

select * from user_objects where object_type = 'PACKAGE'

List package bodies

select * from user_objects where object_type = 'PACKAGE BODY'

List sequences

select * from user_objects where object_type = 'SEQUENCE'

List synonyms

select * from user_objects where object_type = 'SYNONYM'

List triggers

select * from user_objects where object_type = 'TRIGGER'