Skip to main content

Posts

Showing posts with the label SQL Queries Part2

Important SQL Queries Part 2 #DOTC_Mdb

Important Queries in SQL Part2. Hello Everyone, In my previous blog we discussed about some important queries used in SQL and today again we will discuss about some important SQL queries which is useful for you and also this type of queries asked in interview. Before this I suggest you to again see my blogs related to SQL and PL/SQL which you can able to see in archive folder of May and June. Also you can explore my previous below blog SQL part 1 for your reference. https://dheeraj60.blogspot.com/2020/07/important-queries-in-sql-part1-dotcmdb.html   So let’s start with Queries . 1 .Suppose I have created employee table with below data and I want to find the nth highest salary from employee data .   Suppose I want the 2 nd highest salary from employee table then we use below query as in table we have only 8 records . and 1 records have duplicate that is second highest salary from the table . Query is as below : select * from employee a where (1) = (select count(dis...