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 ?
Printable View
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 ?
[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 ?
[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 ?[/QUOTE]
hey dear,
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
Kindly post the query that you are working on.
[QUOTE=ashiexp;28948]hey dear,
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[/QUOTE]
Yes, I need code for that, plz reply me
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..
[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 ?[/QUOTE]
Dear Ravi,
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