Q
Problem solve Get help with specific problems with your technologies, process and projects.

Ways to retrieve data from two tables with same column names

How do I retrieve data from two tables that have the same column names in one table but some different data in the other. Example: How do I get information from dba_sys_privs and dba_tab_privs?
You have three methods here. One, you could use a set operator like the UNION function. Two, you can do a join on the table. Three, you issue two separate SQL queries. In the case of DBA_SYS_PRIVS and DBA_TAB_PRIVS, the UNION function doesn't really apply since they have different columns. And there isn't a common column to join on either. So I'd issue two different SQL queries here.

Dig Deeper on Oracle database design and architecture

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

1 comment

Send me notifications when other members comment.

Please create a username to comment.

hi

i have two table emp_registration and emp_login details. Two table having same Column name  'Emp_id'. I want to compare same Emp_id value is having in two table based on particular date. How to check this condition please help me.
Cancel

-ADS BY GOOGLE

SearchDataManagement

SearchBusinessAnalytics

SearchSAP

SearchSQLServer

TheServerSide.com

SearchDataCenter

SearchContentManagement

SearchHRSoftware

Close