Practice SQL Questions and Answers
- Which of the following is true about a foreign key?
- In normalization, which normal form removes transitive dependencies?
- Deadlock in DBMS can be prevented using:
- Which SQL keyword is used to eliminate duplicate rows in a query result?
- Which SQL function is used to calculate the average of a numeric column?
- Which SQL clause is used to filter results after a GROUP BY operation?
- Which SQL statement combines the results of two queries and removes duplicates?
- Which SQL function returns the largest value in a column?
- Which SQL command is used to modify existing records in a table?
- Which clause is used to sort query results in SQL?
- Which SQL operator is used to search for a pattern in a column?
- Which SQL keyword is used to remove duplicate records from a query result?
- Which SQL clause is used to filter records based on aggregate functions?
- Which operator is used to combine results of two SELECT queries and remove duplicates?
- SQL Injection can be prevented by all EXCEPT:
- Which SQL clause is used to filter groups after aggregation (i.e., having aggregated value conditions)?
- Given a table employees(id, dept_id, salary), which query returns departments with average salary greater than overall average across the company?
- Which of the following SQL constructs avoids returning duplicate rows?
- Which join returns rows from the left table even when there is no matching row in the right table, filling with NULLs for the right side?
- Which index type is most beneficial for queries that use range predicates (e.g., WHERE age BETWEEN 20 AND 30)?
- What is the primary purpose of a `SEQUENCE` in SQL?
- Which of the following statements about SQL `INDEXES` is generally TRUE?
- What is an SQL `VIEW`?
- What is the primary purpose of a `SEQUENCE` in SQL?
- Which of the following statements about SQL `INDEXES` is generally TRUE?
- What is an SQL `VIEW`?
- Which type of index physically reorders the data rows in the table itself based on the index key, meaning the data is stored in the order of the index?
- Which of the following is a key characteristic that distinguishes a PL/SQL `FUNCTION` from a PL/SQL `PROCEDURE`?
- In PL/SQL, what type of parameter allows a procedure to both receive a value from the calling environment and return a modified value back to it?
- Which of the following is a mandatory component of a PL/SQL function's definition?
- What is the primary purpose of a PL/SQL `CURSOR`?
- What is the correct sequence of operations for using an explicit PL/SQL cursor?
- Which PL/SQL cursor attribute returns `TRUE` if the most recent `FETCH` statement returned a row, and `FALSE` otherwise?
- When does an implicit cursor get automatically declared and managed by PL/SQL?
- What is the main function of a PL/SQL `TRIGGER`?
- Which type of index physically reorders the data rows in the table itself based on the index key, meaning the data is stored in the order of the index?
- Which of the following is a key characteristic that distinguishes a PL/SQL `FUNCTION` from a PL/SQL `PROCEDURE`?
- In PL/SQL, what type of parameter allows a procedure to both receive a value from the calling environment and return a modified value back to it?
- A `BEFORE INSERT` trigger fires:
- Which type of trigger fires once for each row affected by the triggering DML statement?
More Topics
- Algorithms Questions
- Analog and Digital Communication Questions
- Artificial Intelligence & Machine Language Questions
- Basics of Computers Questions
- Big Data Analytics Questions
- C Programming Questions
- C++ Questions
- Compiler Design Questions
- Computer Architecture and Design Questions
- Cyber Security Questions
- Data Analytics Languages Questions
- Data Structure Questions
- Data Warehousing Questions
- Digital Logic Questions
- IOT and mobile Computing Questions
- IT DBMS Questions
- IT Networking Questions
- IT Operating System Questions
- Machine Learning Questions
- Memory Management Questions
- Microsoft Office Questions
- Network Layer and IP Protocol Questions
- Numerical and Statistical Computing Questions
- Object Oriented Programming Questions
- OOPS Concepts Questions
- Previous Year Questions Questions
- Programming Concept Questions
- Python Questions
- Shell Scripting Questions
- Software Engineering and Web Technology Questions
- String Manipulation Questions