• Post author:
• Post category:Computer

201. 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. 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

202. The SELECT statement SELECT ‘Hi’ FROM DUAL WHERE NULL = NULL; Outputs
A. Hi
B. FLASE
C. TRUE
D. Nothing

203. 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

204. 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.

205. Let the statement
SELECT column1 FROM myTable;
return 10 rows. The statement
SELECT ALL column1 FROM myTable;
will return
A. less than 10 rows
B. more than 10 rows
C. exactly 10 rows
D. None of these

206. 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
A. 10
B. 9
C. 5
D. 0

207. Which of the following SQL commands can be used to add data to a database table?
B. UPDATE
C. APPEND
D. INSERT

208.Which of the following join is also called as an ‘inner-join’?
A. Non-Equijoin
B. Self-Join
C. Equijoin
D. None of these

209. Which of the following is NOT a type of SQL constraint?
A. PRIMARY KEY
B. ALTERNATE KEY
C. FOREIGN KEY
D. UNIQUE

210. What is an SQL virtual table that is constructed from other tables?
A. view
B. A relation
C. Just another table
D. Query results