Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


find highest salary

Answers were Sorted based on User's Feedback



find highest salary..

Answer / sunil kumar

select max(salary) from tablename

Is This Answer Correct ?    30 Yes 0 No

find highest salary..

Answer / ritu

select max(salary) from tablename

Is This Answer Correct ?    5 Yes 0 No

find highest salary..

Answer / subhra

select max(salary) from table_name;

Is This Answer Correct ?    2 Yes 0 No

find highest salary..

Answer / subashvns

SELECT DISTINCT (
s1.salary
)
FROM `salary` s1
WHERE n -1 = (
SELECT count( DISTINCT (
s2.salary
) )
FROM `salary` s2
WHERE s2.salary > s1.salary )

Is This Answer Correct ?    4 Yes 3 No

find highest salary..

Answer / renji

SELECT DISTINCT (
s1.salary
)
FROM `salary` s1
WHERE n -1 = (
SELECT count( DISTINCT (
s2.salary
) )
FROM `salary` s2
WHERE s2.salary > s1.salary )

Is This Answer Correct ?    1 Yes 0 No

find highest salary..

Answer / qadeer

SELECT DISTINCT (
s1.salary
)
FROM `salary` s1
WHERE n -1 = (
SELECT count( DISTINCT (
s2.salary
) )
FROM `salary` s2
WHERE s2.salary > s1.salary )

Is This Answer Correct ?    2 Yes 2 No

find highest salary..

Answer / ankur gupta

FOR Nth Highest Salary Where N= 1,2,3,4

SELECT * FROM EMP E1 WHERE N=(SELECT COUNT(DISTINCT SAL)
FROM EMP E2 WHERE E1.SAL <= E2.SAL)


I have tested This Query on MySQL 5.1.41. its working fine.

Is This Answer Correct ?    1 Yes 1 No

find highest salary..

Answer / richa

$P = shell_exec("SELECT salary
FROM mytable
ORDER BY
salary DESC");
echo $p[0];

Is This Answer Correct ?    0 Yes 2 No

Post New Answer

More PHP Interview Questions

How many types of array supported in php?

0 Answers  


What is the difference between abstract class and interface in php?

0 Answers  


How to set cookies in PHP?

0 Answers  


how to do connectivity of 2 dbs in PHP script?

3 Answers   TCS,


What are the encryption functions in php?

0 Answers  


What is php routing?

0 Answers  


explain in brief type juggling in php?

1 Answers  


how to retrieve from database..... this format (PRMRMDU402). firstname= prabhu, lastname=kumar, city=madurai, pincode=624402.... i want first name first two letters and last name last two letters ... city first two letters ... pin code last three letters....

2 Answers  


What is the method to register a variable into a session?

0 Answers  


Which have the fastest execution between mysql_fetch_array() and mysql_fetch_assoc()

0 Answers  


Which function is used in php to delete a file?

0 Answers  


When you want to show some part of a text displayed on an html page in red font color? What different possibilities are there to do this? What are the advantages/disadvantages of these methods?

0 Answers  


Categories