Database | SQL | PL- SQL Interview Questions
Write the complete query for Fetching the data from tables. select column1, column2 . . from table_name where <condition> group by <columns> having <conditions> order by <columns> Write the SQL for finding the second highest value. mysql> select * from employee; +---------+--------+ | name | salary | +---------+--------+ | Dhiraj | 1000 | | Dhiraj | 1000 | | Kunal | 2000 | | Aryan | 3000 | +---------+--------+ mysql> select * from employee emp where 2=(select count(distinct salary) from employee where emp.salary>=salary); +-------+--------+ | name | salary | +-------+--------+ | Kunal | 2000 | +-------+--------+ Write the code to find the duplicate records in a ...