Accenture_SQL_Interview_QnA
Accenture_SQL_Interview_QnA
A: DELETE removes rows one by one based on a condition and can be rolled back, whereas
A: Optimize by using proper indexes, avoiding SELECT *, analyzing the execution plan, optimizing
A: INNER JOIN returns rows where there is a match in both tables, while LEFT JOIN returns all
rows from the left table and matching rows from the right table.
A: PRIMARY KEY ensures uniqueness and cannot have NULL values, while a UNIQUE key also
A: GROUP BY groups rows by specified columns, and HAVING filters groups based on a condition.
Q: How do you find the second highest salary from an Employee table?
A: Using LIMIT and OFFSET or a subquery. Example: SELECT MAX(Salary) FROM Employee
A: A stored procedure is a set of SQL statements stored and executed on the server, used for
A: Window functions perform calculations across a set of table rows related to the current row.
Column1, Column2 HAVING COUNT(*) > 1. To remove duplicates, use ROW_NUMBER() and