

MCQOPTIONS
Saved Bookmarks
This section includes 7 Mcqs, each offering curated multiple-choice questions to sharpen your Structured Query Language (SQL) knowledge and support exam preparation. Choose a topic below to get started.
1. |
Which of the following command makes the updates performed by the transaction permanent in the database? |
A. | ROLLBACK |
B. | COMMIT |
C. | TRUNCATE |
D. | DELETE |
Answer» C. TRUNCATE | |
2. |
The SQL statement SELECT SUBSTR('abcdefghij', INSTR('123321234', '2', 3, 2), 2) FROM DUAL;prints |
A. | gh |
B. | 23 |
C. | bc |
D. | ab |
Answer» B. 23 | |
3. |
The SQL statementSELECT SUBSTR('123456789', INSTR('abcabcabc', 'b'), 4) FROM DUAL; |
A. | 6789 |
B. | 2345 |
C. | 1234 |
D. | 456789 |
Answer» C. 1234 | |
4. |
What does the following query find?(SELECT DISTINCT r.sidFROM boats b, reserves rWHERE b.bid = r.bidAND b.color = 'red')MINUS(SELECT DISTINCT r.sidFROM boats b, reserves rWHERE b.bid = r.bidAND b.color = 'g |
A. | Find the sailor IDs of all sailors who have reserved red boats but not green boats |
B. | Find the sailor IDs of at least one sailor who have reserved red boats but not green boats |
C. | Find the sailor Ids of atmost one sailor who have reserved red boats but not green boats |
D. | None of These |
Answer» B. Find the sailor IDs of at least one sailor who have reserved red boats but not green boats | |
5. |
The SELECT statement SELECT 'Hi' FROM DUAL WHERE NULL = NULL;Outputs |
A. | Hi |
B. | FLASE |
C. | TRUE |
D. | Nothing |
Answer» E. | |
6. |
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 |
Answer» D. None of these | |
7. |
Find all the cities with temperature, condition and humidity whose humidity is in the range of 63 to 79 |
A. | SELECT * FROM weather WHERE humidity IN (63 to 79) |
B. | SELECT * FROM weather WHERE humidity NOT IN (63 AND 79) |
C. | SELECT * FROM weather WHERE humidity BETWEEN 63 AND 79 |
D. | SELECT * FROM weather WHERE humidity NOT BETWEEN 63 AND 79 |
Answer» D. SELECT * FROM weather WHERE humidity NOT BETWEEN 63 AND 79 | |