CSE :: SQL Basics
- Which of the following query finds the total rating of the sailors who have reserved boat "103"?
- The SELECT statement SELECT 'Hi' FROM DUAL WHERE NULL = NULL; Outputs
- Which of the following is illegal?
- If a query involves NOT, AND, OR with no parenthesis
-
Let the statement
SELECT column1 FROM myTable;
return 10 rows. The statement
SELECT ALL column1 FROM myTable;
will return -
Table employee has 10 records. It has a non-NULL SALARY column which is also UNIQUE.
The SQL statement
SELECT COUNT(*) FROM employee WHERE SALARY > ALL (SELECT SALARY FROM EMPLOYEE);
prints - Which of the following SQL commands can be used to add data to a database table?
- Which of the following join is also called as an 'inner-join'?
- Which of the following is NOT a type of SQL constraint?
- What is an SQL virtual table that is constructed from other tables?
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.
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 |
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. |