The function of count(*), count(1), count(‘a’) is same. That means that they all gives count of all the rows including...
Continue reading...SQL INTERVIEW QUESTONS
Drop table vs Truncate vs Delete
Drop Table: This statement deletes the table from the database. Truncate: This statement deletes all the rows from the table...
Continue reading...What is the difference between count(*), count(1), count(‘a’), count(column_name)
The function of count(*), count(1), count(‘a’) is same. That means that they all gives count of all the rows including...
Continue reading...Write a query to find the second highest salary of each department
Data id name salary department 1 Gaurav 50200 Account 2 Pyush 10960 HR 3 Ram 70870 Secutity 4 Lakshaman 8600...
Continue reading...Write a query to find the number of gold medals per summer who wins only gold medals
Data YEAR GOLD SILVER BRONZE 2000 Alex Dhruv Shyam 2001 Dev Duggu Chandan 2002 Saksham Arora Dev Lovekush 2003 Ayush...
Continue reading...