Prepare for your Next Interview
|
Welcome to the Geeks Talk forums. You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today! If you have any problems with the registration process or your account login, please contact contact us. |
This is a discussion on To find Maximum Salary within the Oracle forums, part of the Databases category; To find Maximum salary from 5 tables ex: I having five tables 1.emp 2.dept 3.account 4.balance 5.sample I want to get maximum salary from 5 tables ?...
|
|||||||
| Oracle Oracle 9i & Oracle 10g Knowledge Base Learn and Share Oracle Technology related articles, white papers, tutorials / study materials, example codes, FAQ's, Tips and Tricks. |
![]() |
| LinkBack | Thread Tools | Display Modes |
|
|||
|
To find Maximum Salary
To find Maximum salary from 5 tables
ex: I having five tables 1.emp 2.dept 3.account 4.balance 5.sample I want to get maximum salary from 5 tables ? |
| The Following User Says Thank You to S.Ravi For This Useful Post: | ||
| Sponsored Links |
|
|||
|
Re: To find Maximum Salary
[QUOTE=S.Ravi;28933]To find Maximum salary from 5 tables
ex: I having five tables 1.emp 2.dept 3.account 4.balance 5.sample I want to get maximum salary from 5 tables ? |
|
|||
|
Re: To find Maximum Salary
Quote:
Create the join of al five tables by using JOIN clause and then using SELECT MAX(sal) function extract the max salary from the joined table. if u need exact code for that let me know |
| The Following User Says Thank You to ashiexp For This Useful Post: | ||
|
|||
|
Re: To find Maximum Salary
Yes, I need code for that, plz reply me
|
|
|||
|
Re: To find Maximum Salary
It shoud work with little tweaking or no changes ..
select max(salary) as salary from table1 union all select max(salary) as salary from table2 union all select max(salary) as salary from table3 group by salary Let me know if this works.. |
|
|||
|
Re: To find Maximum Salary
Quote:
How can members post query without knowing structure of your tables? Post the structure of your tables or query you tried so far? Regards Krishna |
![]() |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| 1st and 2nd Maximum salary through same SQL Query | amarmail_999 | SQL Server | 4 | 03-25-2009 04:24 AM |
| Give example of mixmize and minimum salary find. | bhushanbhangale | SQL Server | 2 | 03-06-2008 04:20 AM |
| What should be the maximum length of field | Geek_Guest | SAP R/3 | 1 | 02-01-2008 03:14 AM |
| employee name and salary from employee and salary table | Himu | SQL | 1 | 07-04-2007 05:34 AM |
| Find the maximum number of numbers in the sequence | jamesravid | Brainteasers | 10 | 12-06-2006 05:10 AM |