Topic: SQL*Plus and PL/SQL >> Difference b/w two tables/views...
|
Disclaimer: The purpose of all dbapool forums including OCP and Other Oracle Certification forums is to help each other with specific issues but not to share dump and copyrighted exam content, materials or intellectual property.
You may review the entire Oracle Certification Program Candidate Agreement online Here.
|
|
|
|
| Title: Difference b/w two tables/views... |
| Yogesh |
Posted: Dec 21, 2005 10:15:09 PM |
Total Post: 10
Joined: Dec, 2005
|
How can we get the difference (No. of columns/records/permissions) between two different tables/views?
For example:
We have two views USER_TABLES and USER_EXTERNAL_TABLES. Now how can I get the all/some difference(s) between them?
Regards. |
|
|
Vigyan |
| Posted: Dec 22, 2005 10:10:44 PM | |
|
Total Post: 386
Joined: May, 2001
|
You can check number of columns from user_tab_columns view. Use minus operator.
e.g. select column_name from user_tab_columns where table_name = 'A'
minus
select column_name from user_tab_columns where table_name = 'B';
you can do the same for records as well. Use the actual table name when use minus.
Vigyan
|
|
|
|
|
| Time Zone: EDT |
Send this thread to your friend |
|
|
|
|
Forum Rules & Description
Who Can Read The Forum? Any registered user or guest
Who Can Post New Topics? Any registered user
Who Can Post Replies? Any registered user
|
| |
Get FREE Magazines
|
Top 10 Forum User
|
| Murtuja Khokhar | 856 |
| Mohammed Taj | 746 |
| positive fanatic | 483 |
| Jayanta Sur | 479 |
| Vigyan Kaushik | 386 |
| Gitesh Trivedi | 322 |
| Gopu Gopi | 281 |
| neeraj sharma | 254 |
| Ramesh Jois | 245 |
| Bishal Khetan | 207 |
|
|