Search
 
SCRIPT & CODE EXAMPLE
 

SQL

query to find second highest salary

SELECT MAX(SALARY) FROM Employee WHERE SALARY < (SELECT MAX(SALARY) FROM Employee)
Comment

query to find third highest salary

-*FOR THIRD HIGHEST SALARY*

Select top 1 from (select top 3 salary from emp order by salary desc)
order by asc
Comment

PREVIOUS NEXT
Code Example
Sql :: sql create tabel with primary key auto_increment code 
Sql :: multiple count with where clause sql 
Sql :: postgresql function round 
Sql :: sql select inside select 
Sql :: mysql table schema 
Sql :: count the table indatabase 
Sql :: SQL Updating a View 
Sql :: postgressum when 
Sql :: mysql Client does not support authentication protocol requested by server; consider upgrading MySQL client 
Sql :: array of objects sql 
Sql :: uninstall mysql ubuntu 18.04 stackoverflow 
Sql :: sql server today minus n 
Sql :: SQL BACKUP DATABASE for SQL Server 
Sql :: mysql changer nom table 
Sql :: convert html to plain text in sql server 
Sql :: mysql GROUP BY clause; this is incompatible with sql_mode=only_full_group_by 
Sql :: oracle show errors 
Sql :: import mysql database command line 
Sql :: sql order by with where 
Sql :: how to delete database in mysql 
Sql :: implode in sql query 
Sql :: mysql join two tables 
Sql :: postgresql where and 
Sql :: joins in sql 
Sql :: concat all rows in sql postgres 
Sql :: mysql max() 
Sql :: sqlite update query python 
Sql :: how to create triggers in sql server 
Sql :: create a table in sql 
Sql :: sql numeric data type 
ADD CONTENT
Topic
Content
Source link
Name
9+9 =