SQL MCQ Questions and answers – 05 Posted on June 17, 2020June 19, 2020 by admin 3 Created on June 17, 2020 By admin SQL MCQ Questions and answers - 05 1 / 10 1. Which of the following query finds the total rating of the sailors who have reserved boat "103"? A. SELECT SUM(s.rating) FROM sailors s, reserves r AND r.bid = 103; B. SELECT s.rating FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103 C. SELECT COUNT(s.rating) FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103 D. SELECT SUM(s.rating) FROM sailors s, reserves r WHERE s.sid = r.sid AND r.bid = 103 2 / 10 2. The SELECT statement SELECT 'Hi' FROM DUAL WHERE NULL = NULL; Outputs A. Hi B. FLASE C. TRUE D. Nothing 3 / 10 3. Which of the following is illegal? A. SELECT SYSDATE - SYSDATE FROM DUAL; B. SELECT SYSDATE - (SYSDATE - 2) FROM DUAL; C. SELECT SYSDATE - (SYSDATE + 2) FROM DUAL; D. None of these 4 / 10 4. If a query involves NOT, AND, OR with no parenthesis A. NOT will be evaluated first; AND will be evaluated second; OR will be evaluated last. B. NOT will be evaluated first; OR will be evaluated second; AND will be evaluated last. C. AND will be evaluated first; OR will be evaluated second; NOT will be evaluated last. D. The order of occurrence determines the order of evaluation. 5 / 10 5. Let the statementSELECT column1 FROM myTable;return 10 rows. The statementSELECT ALL column1 FROM myTable;will return A. less than 10 rows B. more than 10 rows C. exactly 10 rows D. None of these 6 / 10 6. Table employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE.The SQL statementSELECT COUNT(*) FROM employee WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEE);prints A. 10 B. 9 C. 5 D. 0 7 / 10 7. Which of the following SQL commands can be used to add data to a database table? A. ADD B. UPDATE C. APPEND D. INSERT 8 / 10 8. Which of the following join is also called as an 'inner-join'? A. Non-Equijoin B. Self-Join C. Equijoin D. None of these 9 / 10 9. Which of the following is NOT a type of SQL constraint? A. PRIMARY KEY B. ALTERNATE KEY C. FOREIGN KEY D. UNIQUE 10 / 10 10. What is an SQL virtual table that is constructed from other tables? A. view B. A relation C. Just another table D. Query results Your score is The average score is 13% LinkedIn Facebook Twitter 0% Restart quiz