Database: Check all tables from a known owner

This is an oracle 12c query to find out all tables that are owned by “cyrus”.

select owner,table_name from all_tables where owner='CYRUS';

the contents in the row is case sensitive, in this example the content in row “owner” is CYRUS not Cyrus or cyrus.

another way if you do not know the case of the content use this:

select owner,table_name from all_tables where upper(owner)=upper('cyrus');

another way is to convert the owner name to lower case

select owner,table_name from all_tables where lower(owner)='cyrus';

Advertisement

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s