Die meistgefragten Interviewfragen und Antworten sowie Online-Tests
Lernplattform fur Interviewvorbereitung, Online-Tests, Tutorials und Live-Ubungen

Baue deine Fahigkeiten mit fokussierten Lernpfaden, Probetests und interviewreifem Inhalt aus.

WithoutBook vereint themenbezogene Interviewfragen, Online-Ubungstests, Tutorials und Vergleichsleitfaden in einem responsiven Lernbereich.

Interview vorbereiten

Probeprufungen

Als Startseite festlegen

Diese Seite als Lesezeichen speichern

E-Mail-Adresse abonnieren
WithoutBook LIVE Mock Interviews
The Best LIVE Mock Interview - You should go through before interview

Freshers / Beginner level questions & answers

Ques 1. What is SQL?

SQL (Structured Query Language) is a domain-specific language used for managing and manipulating relational databases.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 2. What is the difference between SQL and MySQL?

SQL is a language, whereas MySQL is a relational database management system that uses SQL as its query language.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 3. What is a primary key?

A primary key is a unique identifier for a record in a table. It must contain unique values and cannot be NULL.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 4. What is an index in a database?

An index is a data structure that improves the speed of data retrieval operations on a database table at the cost of additional writes and storage space.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 5. What is a foreign key?

A foreign key is a column or a set of columns in a table that refers to the primary key of another table, establishing a link between the two tables.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 6. Write a SQL query to count the number of rows in a table.

SELECT COUNT(*) FROM table;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 7. What is a view in a database?

A view is a virtual table based on the result of a SELECT query, and it does not store the data itself.

Example:

CREATE VIEW view_name AS SELECT column1, column2 FROM table WHERE condition;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 8. Write a SQL query to update multiple rows in a table.

UPDATE table SET column1 = value1, column2 = value2 WHERE condition;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 9. Explain the purpose of the ORDER BY clause.

The ORDER BY clause is used to sort the result set of a query in ascending or descending order based on one or more columns.

Example:

SELECT column1, column2 FROM table ORDER BY column1 DESC;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 10. Write a SQL query to find the most recent record in a table.

SELECT * FROM table ORDER BY timestamp_column DESC LIMIT 1;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 11. Explain the difference between CHAR and VARCHAR data types.

CHAR is a fixed-length string data type, while VARCHAR is a variable-length string data type. CHAR pads spaces to the maximum length, while VARCHAR only stores the actual data without padding.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 12. What is the purpose of the SQL DISTINCT keyword?

The DISTINCT keyword is used to return unique values in the result set of a SELECT query by eliminating duplicate rows.

Example:

SELECT DISTINCT column FROM table;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 13. What is the purpose of the SQL UPDATE statement?

The UPDATE statement is used to modify the existing records in a table by changing the values of one or more columns.

Example:

UPDATE table SET column1 = value1, column2 = value2 WHERE condition;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 14. What is the purpose of the SQL LIKE operator?

The LIKE operator is used to search for a specified pattern in a column. It is often used with wildcard characters (% and _).

Example:

SELECT * FROM table WHERE column LIKE 'pattern%';

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 15. Write a SQL query to find the top N records from a table.

SELECT * FROM table ORDER BY column DESC LIMIT N;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Intermediate / 1 to 5 years experienced level questions & answers

Ques 16. Explain the SELECT statement.

The SELECT statement is used to query the database and retrieve data from one or more tables.

Example:

SELECT column1, column2 FROM table WHERE condition;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 17. What is normalization?

Normalization is the process of organizing data in a database to reduce redundancy and dependency.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 18. Explain INNER JOIN and LEFT JOIN.

INNER JOIN returns rows when there is a match in both tables. LEFT JOIN returns all rows from the left table and matching rows from the right table.

Example:

SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 19. Write a SQL query to calculate the average salary for each department.

SELECT department, AVG(salary) FROM Employee GROUP BY department;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 20. Explain the difference between UNION and UNION ALL.

UNION combines and returns unique rows from multiple SELECT statements, while UNION ALL returns all rows including duplicates.

Example:

SELECT column1 FROM table1 UNION SELECT column1 FROM table2;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 21. Explain the difference between DELETE and TRUNCATE commands.

DELETE is used to remove rows from a table based on a condition. TRUNCATE removes all rows from a table without logging individual row deletions.

Example:

DELETE FROM table WHERE condition;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 22. Explain the concept of ACID properties in a database.

ACID (Atomicity, Consistency, Isolation, Durability) properties ensure the reliability of database transactions.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 23. Explain the GROUP BY clause.

The GROUP BY clause is used in a SELECT statement to arrange identical data into groups, typically used with aggregate functions.

Example:

SELECT column, COUNT(*) FROM table GROUP BY column;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 24. What is a stored procedure?

A stored procedure is a set of SQL statements that can be stored in the database and executed by calling the procedure.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 25. Write a SQL query to find duplicate records in a table.

SELECT column, COUNT(*) FROM table GROUP BY column HAVING COUNT(*) > 1;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 26. Explain the purpose of the HAVING clause.

The HAVING clause is used in combination with the GROUP BY clause to filter the results of aggregate functions based on specified conditions.

Example:

SELECT column, COUNT(*) FROM table GROUP BY column HAVING COUNT(*) > 1;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 27. Explain the difference between a primary key and a unique key.

A primary key is used to uniquely identify each record in a table and cannot contain NULL values. A unique key enforces uniqueness but can contain NULL values.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 28. Explain the difference between UNION and JOIN.

UNION is used to combine the results of two or more SELECT statements, while JOIN is used to retrieve data from multiple tables based on a related column between them.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 29. What is a trigger in SQL?

A trigger is a set of instructions that are automatically executed (or 'triggered') in response to certain events on a particular table or view.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 30. What is a self-join?

A self-join is a regular join, but the table is joined with itself. It is useful when you want to combine rows with related data in the same table.

Example:

SELECT employee1.name, employee2.name FROM Employee employee1, Employee employee2 WHERE employee1.manager_id = employee2.employee_id;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 31. Explain the concept of a composite key.

A composite key consists of more than one column and is used to uniquely identify a record in a table when a single column is not sufficient.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 32. What is the difference between a stored procedure and a function?

A stored procedure does not necessarily return a value, while a function must return a value. Functions can be used in SQL statements, whereas procedures cannot.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 33. Explain the purpose of the SQL CASE statement.

The CASE statement is used to perform conditional logic within a SQL query, similar to an IF-THEN-ELSE statement in other programming languages.

Example:

SELECT column1, CASE WHEN condition THEN 'Result1' ELSE 'Result2' END AS NewColumn FROM table;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 34. What is a subquery? Provide an example.

A subquery is a query embedded within another query. It can be used to retrieve data that will be used in the main query. Example: SELECT column FROM table WHERE column IN (SELECT column FROM another_table);

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 35. Write a SQL query to find the total count of rows in each table of a database.

SELECT table_name, COUNT(*) FROM information_schema.tables GROUP BY table_name;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 36. Explain the purpose of the SQL HAVING clause.

The HAVING clause is used to filter the results of aggregate functions in a SELECT statement based on specified conditions.

Example:

SELECT column, COUNT(*) FROM table GROUP BY column HAVING COUNT(*) > 1;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 37. What is the difference between UNION and UNION ALL?

UNION combines and returns unique rows from multiple SELECT statements, while UNION ALL returns all rows including duplicates.

Example:

SELECT column1 FROM table1 UNION SELECT column1 FROM table2;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 38. Explain the purpose of the SQL INDEX.

An INDEX is a performance optimization feature that allows faster retrieval of records from a table. It is created on one or more columns of a table.

Example:

CREATE INDEX index_name ON table(column);

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 39. What is a self-referencing foreign key?

A self-referencing foreign key is a foreign key in a table that references the primary key of the same table, creating a relationship within the same table.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 40. Write a SQL query to find the total salary expense for each department.

SELECT department, SUM(salary) FROM Employee GROUP BY department;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 41. Write a SQL query to find the employees who do not belong to any department.

SELECT * FROM Employee WHERE department_id IS NULL;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 42. Explain the difference between the INNER JOIN and OUTER JOIN.

INNER JOIN returns rows when there is a match in both tables, while OUTER JOIN returns all rows from one table and the matching rows from the other table, filling in the missing values with NULLs.

Example:

SELECT * FROM table1 INNER JOIN table2 ON table1.id = table2.id;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 43. Explain the concept of a natural join.

A natural join is a type of JOIN that automatically matches columns with the same name in the joined tables. It eliminates duplicate columns in the result set.

Example:

SELECT * FROM table1 NATURAL JOIN table2;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 44. Explain the concept of a CTE (Common Table Expression).

A CTE is a temporary result set that can be referenced within a SELECT, INSERT, UPDATE, or DELETE statement. It improves the readability and maintainability of complex queries.

Example:

WITH cte_name AS (SELECT * FROM table) SELECT * FROM cte_name;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 45. Explain the purpose of the SQL GROUP_CONCAT() function.

The GROUP_CONCAT() function is used to concatenate values from multiple rows into a single string, grouped by a specified column.

Example:

SELECT department, GROUP_CONCAT(employee_name) FROM Employee GROUP BY department;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 46. What is a common use case for the SQL COALESCE() function?

The COALESCE() function is used to return the first non-null expression among its arguments. A common use case is handling null values in a query.

Example:

SELECT COALESCE(column1, 'DefaultValue') FROM table;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 47. Explain the purpose of the SQL SESSION_USER and SYSTEM_USER functions.

SESSION_USER returns the current username, and SYSTEM_USER returns the login name of the current user.

Example:

SELECT SESSION_USER, SYSTEM_USER;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 48. What is the purpose of the SQL JSON functions (JSON_VALUE, JSON_QUERY, etc.)?

JSON functions in SQL are used to process JSON data. JSON_VALUE is used to extract a scalar value, and JSON_QUERY is used to extract an object or an array.

Example:

SELECT JSON_VALUE(json_column, '$.key') AS Value FROM table;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 49. Explain the purpose of the SQL STRING_AGG() function.

The STRING_AGG() function is used to concatenate values from multiple rows into a single string with a specified separator.

Example:

SELECT department, STRING_AGG(employee_name, ', ') AS EmployeeList FROM Employee GROUP BY department;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 50. Write a SQL query to find the employees who joined the company in the last N months.

SELECT * FROM Employee WHERE JOIN_DATE >= DATEADD(MONTH, -N, GETDATE());

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Experienced / Expert level questions & answers

Ques 51. Write a SQL query to find the second highest salary from an Employee table.

SELECT MAX(salary) FROM Employee WHERE salary < (SELECT MAX(salary) FROM Employee);

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 52. Write a SQL query to find the third highest salary from an Employee table.

SELECT MAX(salary) FROM Employee WHERE salary < (SELECT MAX(salary) FROM Employee WHERE salary < (SELECT MAX(salary) FROM Employee));

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 53. Write a SQL query to find the nth highest salary from an Employee table.

SELECT salary FROM Employee ORDER BY salary DESC LIMIT 1 OFFSET n-1;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 54. Write a SQL query to find the average salary of employees in each department, excluding departments with fewer than five employees.

SELECT department, AVG(salary) FROM Employee GROUP BY department HAVING COUNT(*) >= 5;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 55. Explain the concept of SQL injection.

SQL injection is a security vulnerability where an attacker can insert malicious SQL code into a query, potentially gaining unauthorized access to a database.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 56. What is the purpose of the SQL TRIGGER?

A TRIGGER is a set of instructions that are automatically executed (or 'triggered') in response to specific events, such as INSERTs, UPDATEs, or DELETEs, on a particular table.

Example:

CREATE TRIGGER trigger_name BEFORE INSERT ON table FOR EACH ROW BEGIN -- trigger logic END;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 57. Explain the purpose of the SQL ROLLUP operator.

The ROLLUP operator is used in conjunction with the GROUP BY clause to generate subtotals and grand totals for a set of columns in the result set.

Example:

SELECT department, city, SUM(salary) FROM Employee GROUP BY ROLLUP (department, city);

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 58. Write a SQL query to find the nth highest salary without using the LIMIT clause.

SELECT salary FROM Employee e1 WHERE n-1 = (SELECT COUNT(DISTINCT salary) FROM Employee e2 WHERE e1.salary <= e2.salary);

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 59. Explain the purpose of the SQL LEAD() and LAG() functions.

The LEAD() function is used to access the next row's data in the result set, while the LAG() function is used to access the previous row's data.

Example:

SELECT employee_name, salary, LEAD(salary) OVER (ORDER BY salary) AS NextSalary FROM Employee;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 60. What is the purpose of the SQL CROSS APPLY operator?

The CROSS APPLY operator is used to invoke a table-valued function for each row returned by the outer query. It is similar to the INNER JOIN clause.

Example:

SELECT * FROM table1 CROSS APPLY function(table1.column) AS alias;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 61. Write a SQL query to find the employees who have the highest salary in each department.

SELECT department, employee_name, salary FROM (SELECT department, employee_name, salary, ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC) AS rnk FROM Employee) AS ranked WHERE rnk = 1;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 62. Explain the purpose of the SQL MERGE statement.

The MERGE statement is used to perform insert, update, or delete operations on a target table based on the results of a join with a source table. It is also known as an 'upsert' operation.

Example:

MERGE INTO target_table USING source_table ON condition WHEN MATCHED THEN UPDATE SET column1 = value1 WHEN NOT MATCHED THEN INSERT (column1, column2) VALUES (value1, value2);

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 63. What is the purpose of the SQL WINDOW functions?

WINDOW functions perform a calculation across a set of table rows related to the current row. They are used with the OVER() clause to define a window or a subset of rows for the calculation.

Example:

SELECT employee_name, salary, AVG(salary) OVER (PARTITION BY department) AS AvgSalary FROM Employee;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 64. Write a SQL query to find the employees with the second-highest salary in each department.

SELECT department, employee_name, salary FROM (SELECT department, employee_name, salary, ROW_NUMBER() OVER (PARTITION BY department ORDER BY salary DESC) AS rnk FROM Employee) AS ranked WHERE rnk = 2;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 65. Explain the purpose of the SQL XML functions (XMLAGG, XMLPARSE, XMLQUERY, etc.).

XML functions in SQL are used to process XML data. XMLAGG is used to concatenate XML values, XMLPARSE is used to convert a string to XML, and XMLQUERY is used to extract data from XML.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 66. What is the purpose of the SQL PIVOT and UNPIVOT operators?

The PIVOT operator is used to rotate rows into columns, while the UNPIVOT operator is used to rotate columns into rows.

Example:

SELECT * FROM (SELECT department, salary FROM Employee) AS SourceTable PIVOT (SUM(salary) FOR department IN ([Dept1], [Dept2], [Dept3])) AS PivotTable;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 67. Write a SQL query to find the cumulative sum of a column in a result set.

SELECT column, SUM(column) OVER (ORDER BY some_order_column) AS CumulativeSum FROM table;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 68. Explain the purpose of the SQL ROW and RANGE clauses in window functions.

ROW and RANGE are used in the OVER() clause of window functions to define the window or subset of rows for the calculation. ROW refers to a physical count, while RANGE considers values within a specified range.

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 69. Write a SQL query to find the employees with the highest salary in each department using the DENSE_RANK() function.

SELECT department, employee_name, salary FROM (SELECT department, employee_name, salary, DENSE_RANK() OVER (PARTITION BY department ORDER BY salary DESC) AS rnk FROM Employee) AS ranked WHERE rnk = 1;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Ques 70. What is the purpose of the SQL TRY...CATCH statement?

The TRY...CATCH statement is used to handle errors in a SQL Server stored procedure. It allows for structured error handling and graceful error recovery.

Example:

BEGIN TRY -- SQL statements END TRY BEGIN CATCH -- Handling of errors END CATCH;

Save For Revision

Save For Revision

Bookmark this item, mark it difficult, or place it in a revision set.

Open My Learning Library

Is it helpful? Add Comment View Comments
 

Most helpful rated by users:

Related interview subjects

Redis Cache interviewfragen und antworten - Total 20 questions
MySQL interviewfragen und antworten - Total 108 questions
Data Modeling interviewfragen und antworten - Total 30 questions
MariaDB interviewfragen und antworten - Total 40 questions
DBMS interviewfragen und antworten - Total 73 questions
Apache Hive interviewfragen und antworten - Total 30 questions
PostgreSQL interviewfragen und antworten - Total 30 questions
SSIS interviewfragen und antworten - Total 30 questions
Teradata interviewfragen und antworten - Total 20 questions
SQL Query interviewfragen und antworten - Total 70 questions
SQLite interviewfragen und antworten - Total 53 questions
Cassandra interviewfragen und antworten - Total 25 questions
Neo4j interviewfragen und antworten - Total 44 questions
MSSQL interviewfragen und antworten - Total 50 questions
OrientDB interviewfragen und antworten - Total 46 questions
Data Warehouse interviewfragen und antworten - Total 20 questions
SQL interviewfragen und antworten - Total 152 questions
IBM DB2 interviewfragen und antworten - Total 40 questions
Elasticsearch interviewfragen und antworten - Total 61 questions
Data Mining interviewfragen und antworten - Total 30 questions
Oracle interviewfragen und antworten - Total 34 questions
MongoDB interviewfragen und antworten - Total 27 questions
AWS DynamoDB interviewfragen und antworten - Total 46 questions
Entity Framework interviewfragen und antworten - Total 46 questions

All interview subjects

LINQ interviewfragen und antworten - Total 20 questions
C# interviewfragen und antworten - Total 41 questions
ASP .NET interviewfragen und antworten - Total 31 questions
Microsoft .NET interviewfragen und antworten - Total 60 questions
ASP interviewfragen und antworten - Total 82 questions
Google Cloud AI interviewfragen und antworten - Total 30 questions
IBM Watson interviewfragen und antworten - Total 30 questions
Perplexity AI interviewfragen und antworten - Total 40 questions
ChatGPT interviewfragen und antworten - Total 20 questions
NLP interviewfragen und antworten - Total 30 questions
AI Agents (Agentic AI) interviewfragen und antworten - Total 50 questions
OpenCV interviewfragen und antworten - Total 36 questions
Amazon SageMaker interviewfragen und antworten - Total 30 questions
TensorFlow interviewfragen und antworten - Total 30 questions
Hugging Face interviewfragen und antworten - Total 30 questions
Gemini AI interviewfragen und antworten - Total 50 questions
Oracle AI Agents interviewfragen und antworten - Total 50 questions
Artificial Intelligence (AI) interviewfragen und antworten - Total 47 questions
Machine Learning interviewfragen und antworten - Total 30 questions
Python Coding interviewfragen und antworten - Total 20 questions
Scala interviewfragen und antworten - Total 48 questions
Swift interviewfragen und antworten - Total 49 questions
Golang interviewfragen und antworten - Total 30 questions
Embedded C interviewfragen und antworten - Total 30 questions
C++ interviewfragen und antworten - Total 142 questions
VBA interviewfragen und antworten - Total 30 questions
COBOL interviewfragen und antworten - Total 50 questions
R Language interviewfragen und antworten - Total 30 questions
CCNA interviewfragen und antworten - Total 40 questions
Oracle APEX interviewfragen und antworten - Total 23 questions
Oracle Cloud Infrastructure (OCI) interviewfragen und antworten - Total 100 questions
AWS interviewfragen und antworten - Total 87 questions
Microsoft Azure interviewfragen und antworten - Total 35 questions
Azure Data Factory interviewfragen und antworten - Total 30 questions
OpenStack interviewfragen und antworten - Total 30 questions
ServiceNow interviewfragen und antworten - Total 30 questions
Snowflake interviewfragen und antworten - Total 30 questions
LGPD interviewfragen und antworten - Total 20 questions
PDPA interviewfragen und antworten - Total 20 questions
OSHA interviewfragen und antworten - Total 20 questions
HIPPA interviewfragen und antworten - Total 20 questions
PHIPA interviewfragen und antworten - Total 20 questions
FERPA interviewfragen und antworten - Total 20 questions
DPDP interviewfragen und antworten - Total 30 questions
PIPEDA interviewfragen und antworten - Total 20 questions
GDPR interviewfragen und antworten - Total 30 questions
CCPA interviewfragen und antworten - Total 20 questions
HITRUST interviewfragen und antworten - Total 20 questions
PoowerPoint interviewfragen und antworten - Total 50 questions
Data Structures interviewfragen und antworten - Total 49 questions
Computer Networking interviewfragen und antworten - Total 65 questions
Microsoft Excel interviewfragen und antworten - Total 37 questions
Computer Basics interviewfragen und antworten - Total 62 questions
Computer Science interviewfragen und antworten - Total 50 questions
Operating System interviewfragen und antworten - Total 22 questions
MS Word interviewfragen und antworten - Total 50 questions
Tips and Tricks interviewfragen und antworten - Total 30 questions
Pandas interviewfragen und antworten - Total 30 questions
Deep Learning interviewfragen und antworten - Total 29 questions
Flask interviewfragen und antworten - Total 40 questions
PySpark interviewfragen und antworten - Total 30 questions
PyTorch interviewfragen und antworten - Total 25 questions
Data Science interviewfragen und antworten - Total 23 questions
SciPy interviewfragen und antworten - Total 30 questions
Generative AI interviewfragen und antworten - Total 30 questions
NumPy interviewfragen und antworten - Total 30 questions
Python interviewfragen und antworten - Total 106 questions
Python Pandas interviewfragen und antworten - Total 48 questions
Django interviewfragen und antworten - Total 50 questions
Python Matplotlib interviewfragen und antworten - Total 30 questions
Redis Cache interviewfragen und antworten - Total 20 questions
MySQL interviewfragen und antworten - Total 108 questions
Data Modeling interviewfragen und antworten - Total 30 questions
MariaDB interviewfragen und antworten - Total 40 questions
DBMS interviewfragen und antworten - Total 73 questions
Apache Hive interviewfragen und antworten - Total 30 questions
PostgreSQL interviewfragen und antworten - Total 30 questions
SSIS interviewfragen und antworten - Total 30 questions
Teradata interviewfragen und antworten - Total 20 questions
SQL Query interviewfragen und antworten - Total 70 questions
SQLite interviewfragen und antworten - Total 53 questions
Cassandra interviewfragen und antworten - Total 25 questions
Neo4j interviewfragen und antworten - Total 44 questions
MSSQL interviewfragen und antworten - Total 50 questions
OrientDB interviewfragen und antworten - Total 46 questions
Data Warehouse interviewfragen und antworten - Total 20 questions
SQL interviewfragen und antworten - Total 152 questions
IBM DB2 interviewfragen und antworten - Total 40 questions
Elasticsearch interviewfragen und antworten - Total 61 questions
Data Mining interviewfragen und antworten - Total 30 questions
Oracle interviewfragen und antworten - Total 34 questions
MongoDB interviewfragen und antworten - Total 27 questions
AWS DynamoDB interviewfragen und antworten - Total 46 questions
Entity Framework interviewfragen und antworten - Total 46 questions
Data Engineer interviewfragen und antworten - Total 30 questions
AutoCAD interviewfragen und antworten - Total 30 questions
Robotics interviewfragen und antworten - Total 28 questions
Power System interviewfragen und antworten - Total 28 questions
Electrical Engineering interviewfragen und antworten - Total 30 questions
Verilog interviewfragen und antworten - Total 30 questions
VLSI interviewfragen und antworten - Total 30 questions
Software Engineering interviewfragen und antworten - Total 27 questions
MATLAB interviewfragen und antworten - Total 25 questions
Digital Electronics interviewfragen und antworten - Total 38 questions
Civil Engineering interviewfragen und antworten - Total 30 questions
Electrical Machines interviewfragen und antworten - Total 29 questions
Oracle CXUnity interviewfragen und antworten - Total 29 questions
Web Services interviewfragen und antworten - Total 10 questions
Salesforce Lightning interviewfragen und antworten - Total 30 questions
IBM Integration Bus interviewfragen und antworten - Total 30 questions
Power BI interviewfragen und antworten - Total 24 questions
OIC interviewfragen und antworten - Total 30 questions
Dell Boomi interviewfragen und antworten - Total 30 questions
Web API interviewfragen und antworten - Total 31 questions
IBM DataStage interviewfragen und antworten - Total 20 questions
Talend interviewfragen und antworten - Total 34 questions
Salesforce interviewfragen und antworten - Total 57 questions
TIBCO interviewfragen und antworten - Total 30 questions
Informatica interviewfragen und antworten - Total 48 questions
Log4j interviewfragen und antworten - Total 35 questions
JBoss interviewfragen und antworten - Total 14 questions
Java Mail interviewfragen und antworten - Total 27 questions
Java Applet interviewfragen und antworten - Total 29 questions
Google Gson interviewfragen und antworten - Total 8 questions
Java 21 interviewfragen und antworten - Total 21 questions
Apache Camel interviewfragen und antworten - Total 20 questions
Struts interviewfragen und antworten - Total 84 questions
RMI interviewfragen und antworten - Total 31 questions
Java Support interviewfragen und antworten - Total 30 questions
JAXB interviewfragen und antworten - Total 18 questions
Apache Tapestry interviewfragen und antworten - Total 9 questions
JSP interviewfragen und antworten - Total 49 questions
Java Concurrency interviewfragen und antworten - Total 30 questions
J2EE interviewfragen und antworten - Total 25 questions
JUnit interviewfragen und antworten - Total 24 questions
Java OOPs interviewfragen und antworten - Total 30 questions
Java 11 interviewfragen und antworten - Total 24 questions
JDBC interviewfragen und antworten - Total 27 questions
Java Garbage Collection interviewfragen und antworten - Total 30 questions
Spring Framework interviewfragen und antworten - Total 53 questions
Java Swing interviewfragen und antworten - Total 27 questions
Java Design Patterns interviewfragen und antworten - Total 15 questions
JPA interviewfragen und antworten - Total 41 questions
Java 8 interviewfragen und antworten - Total 30 questions
Hibernate interviewfragen und antworten - Total 52 questions
JMS interviewfragen und antworten - Total 64 questions
JSF interviewfragen und antworten - Total 24 questions
Java 17 interviewfragen und antworten - Total 20 questions
Spring Boot interviewfragen und antworten - Total 50 questions
Servlets interviewfragen und antworten - Total 34 questions
Kotlin interviewfragen und antworten - Total 30 questions
EJB interviewfragen und antworten - Total 80 questions
Java Beans interviewfragen und antworten - Total 57 questions
Java Exception Handling interviewfragen und antworten - Total 30 questions
Java 15 interviewfragen und antworten - Total 16 questions
Apache Wicket interviewfragen und antworten - Total 26 questions
Core Java interviewfragen und antworten - Total 306 questions
Java Multithreading interviewfragen und antworten - Total 30 questions
Pega interviewfragen und antworten - Total 30 questions
ITIL interviewfragen und antworten - Total 25 questions
Finance interviewfragen und antworten - Total 30 questions
JIRA interviewfragen und antworten - Total 30 questions
SAP MM interviewfragen und antworten - Total 30 questions
SAP ABAP interviewfragen und antworten - Total 24 questions
SCCM interviewfragen und antworten - Total 30 questions
Tally interviewfragen und antworten - Total 30 questions
Ionic interviewfragen und antworten - Total 32 questions
Android interviewfragen und antworten - Total 14 questions
Mobile Computing interviewfragen und antworten - Total 20 questions
Xamarin interviewfragen und antworten - Total 31 questions
iOS interviewfragen und antworten - Total 52 questions
Laravel interviewfragen und antworten - Total 30 questions
XML interviewfragen und antworten - Total 25 questions
GraphQL interviewfragen und antworten - Total 32 questions
Bitcoin interviewfragen und antworten - Total 30 questions
Active Directory interviewfragen und antworten - Total 30 questions
Microservices interviewfragen und antworten - Total 30 questions
Apache Kafka interviewfragen und antworten - Total 38 questions
Tableau interviewfragen und antworten - Total 20 questions
Adobe AEM interviewfragen und antworten - Total 50 questions
Kubernetes interviewfragen und antworten - Total 30 questions
OOPs interviewfragen und antworten - Total 30 questions
Fashion Designer interviewfragen und antworten - Total 20 questions
Desktop Support interviewfragen und antworten - Total 30 questions
IAS interviewfragen und antworten - Total 56 questions
PHP OOPs interviewfragen und antworten - Total 30 questions
Nursing interviewfragen und antworten - Total 40 questions
Linked List interviewfragen und antworten - Total 15 questions
Dynamic Programming interviewfragen und antworten - Total 30 questions
SharePoint interviewfragen und antworten - Total 28 questions
CICS interviewfragen und antworten - Total 30 questions
Yoga Teachers Training interviewfragen und antworten - Total 30 questions
Language in C interviewfragen und antworten - Total 80 questions
Behavioral interviewfragen und antworten - Total 29 questions
School Teachers interviewfragen und antworten - Total 25 questions
Full-Stack Developer interviewfragen und antworten - Total 60 questions
Statistics interviewfragen und antworten - Total 30 questions
Digital Marketing interviewfragen und antworten - Total 40 questions
Apache Spark interviewfragen und antworten - Total 24 questions
VISA interviewfragen und antworten - Total 30 questions
IIS interviewfragen und antworten - Total 30 questions
System Design interviewfragen und antworten - Total 30 questions
SEO interviewfragen und antworten - Total 51 questions
Google Analytics interviewfragen und antworten - Total 30 questions
Cloud Computing interviewfragen und antworten - Total 42 questions
BPO interviewfragen und antworten - Total 48 questions
ANT interviewfragen und antworten - Total 10 questions
Agile Methodology interviewfragen und antworten - Total 30 questions
HR Questions interviewfragen und antworten - Total 49 questions
REST API interviewfragen und antworten - Total 52 questions
Content Writer interviewfragen und antworten - Total 30 questions
SAS interviewfragen und antworten - Total 24 questions
Control System interviewfragen und antworten - Total 28 questions
Mainframe interviewfragen und antworten - Total 20 questions
Hadoop interviewfragen und antworten - Total 40 questions
Banking interviewfragen und antworten - Total 20 questions
Checkpoint interviewfragen und antworten - Total 20 questions
Blockchain interviewfragen und antworten - Total 29 questions
Technical Support interviewfragen und antworten - Total 30 questions
Sales interviewfragen und antworten - Total 30 questions
Nature interviewfragen und antworten - Total 20 questions
Chemistry interviewfragen und antworten - Total 50 questions
Docker interviewfragen und antworten - Total 30 questions
SDLC interviewfragen und antworten - Total 75 questions
Cryptography interviewfragen und antworten - Total 40 questions
RPA interviewfragen und antworten - Total 26 questions
Interview Tips interviewfragen und antworten - Total 30 questions
College Teachers interviewfragen und antworten - Total 30 questions
Blue Prism interviewfragen und antworten - Total 20 questions
Memcached interviewfragen und antworten - Total 28 questions
GIT interviewfragen und antworten - Total 30 questions
Algorithm interviewfragen und antworten - Total 50 questions
Business Analyst interviewfragen und antworten - Total 40 questions
Splunk interviewfragen und antworten - Total 30 questions
DevOps interviewfragen und antworten - Total 45 questions
Accounting interviewfragen und antworten - Total 30 questions
SSB interviewfragen und antworten - Total 30 questions
OSPF interviewfragen und antworten - Total 30 questions
Sqoop interviewfragen und antworten - Total 30 questions
JSON interviewfragen und antworten - Total 16 questions
Accounts Payable interviewfragen und antworten - Total 30 questions
Computer Graphics interviewfragen und antworten - Total 25 questions
IoT interviewfragen und antworten - Total 30 questions
Insurance interviewfragen und antworten - Total 30 questions
Scrum Master interviewfragen und antworten - Total 30 questions
Express.js interviewfragen und antworten - Total 30 questions
Ansible interviewfragen und antworten - Total 30 questions
ES6 interviewfragen und antworten - Total 30 questions
Electron.js interviewfragen und antworten - Total 24 questions
RxJS interviewfragen und antworten - Total 29 questions
NodeJS interviewfragen und antworten - Total 30 questions
ExtJS interviewfragen und antworten - Total 50 questions
jQuery interviewfragen und antworten - Total 22 questions
Vue.js interviewfragen und antworten - Total 30 questions
Svelte.js interviewfragen und antworten - Total 30 questions
Shell Scripting interviewfragen und antworten - Total 50 questions
Next.js interviewfragen und antworten - Total 30 questions
Knockout JS interviewfragen und antworten - Total 25 questions
TypeScript interviewfragen und antworten - Total 38 questions
PowerShell interviewfragen und antworten - Total 27 questions
Terraform interviewfragen und antworten - Total 30 questions
JCL interviewfragen und antworten - Total 20 questions
JavaScript interviewfragen und antworten - Total 59 questions
Ajax interviewfragen und antworten - Total 58 questions
Ethical Hacking interviewfragen und antworten - Total 40 questions
Cyber Security interviewfragen und antworten - Total 50 questions
PII interviewfragen und antworten - Total 30 questions
Data Protection Act interviewfragen und antworten - Total 20 questions
BGP interviewfragen und antworten - Total 30 questions
Ubuntu interviewfragen und antworten - Total 30 questions
Linux interviewfragen und antworten - Total 43 questions
Unix interviewfragen und antworten - Total 105 questions
Weblogic interviewfragen und antworten - Total 30 questions
Tomcat interviewfragen und antworten - Total 16 questions
Glassfish interviewfragen und antworten - Total 8 questions
TestNG interviewfragen und antworten - Total 38 questions
Postman interviewfragen und antworten - Total 30 questions
SDET interviewfragen und antworten - Total 30 questions
Selenium interviewfragen und antworten - Total 40 questions
Kali Linux interviewfragen und antworten - Total 29 questions
Mobile Testing interviewfragen und antworten - Total 30 questions
UiPath interviewfragen und antworten - Total 38 questions
Quality Assurance interviewfragen und antworten - Total 56 questions
API Testing interviewfragen und antworten - Total 30 questions
Appium interviewfragen und antworten - Total 30 questions
ETL Testing interviewfragen und antworten - Total 20 questions
Cucumber interviewfragen und antworten - Total 30 questions
QTP interviewfragen und antworten - Total 44 questions
PHP interviewfragen und antworten - Total 27 questions
Oracle JET(OJET) interviewfragen und antworten - Total 54 questions
Frontend Developer interviewfragen und antworten - Total 30 questions
Zend Framework interviewfragen und antworten - Total 24 questions
RichFaces interviewfragen und antworten - Total 26 questions
HTML interviewfragen und antworten - Total 27 questions
Flutter interviewfragen und antworten - Total 25 questions
CakePHP interviewfragen und antworten - Total 30 questions
React interviewfragen und antworten - Total 40 questions
React Native interviewfragen und antworten - Total 26 questions
Angular JS interviewfragen und antworten - Total 21 questions
Web Developer interviewfragen und antworten - Total 50 questions
Angular 8 interviewfragen und antworten - Total 32 questions
Dojo interviewfragen und antworten - Total 23 questions
Symfony interviewfragen und antworten - Total 30 questions
GWT interviewfragen und antworten - Total 27 questions
CSS interviewfragen und antworten - Total 74 questions
Ruby On Rails interviewfragen und antworten - Total 74 questions
Yii interviewfragen und antworten - Total 30 questions
Angular interviewfragen und antworten - Total 50 questions
Copyright © 2026, WithoutBook.