• Post author:
  • Post category:Computer

181. 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 > ANY (SELECT SALARY FROM EMPLOYEE);
Prints
A. 10
B. 9
C. 5
D. 0

182. The SQL statement
SELECT SUBSTR(‘abcdefghij’, INSTR(‘123321234’, ‘2’, 3, 2), 2) FROM DUAL;
prints
A. gh
B. 23
C. bc
D. ab

183. The SQL statement
SELECT ROUND(45.926, -1) FROM DUAL;
A. is illegal
B. prints garbage
C. prints 045.926
D. prints 50

184. Which of the following must be enclosed in double quotes?
A. Dates
B. Column Alias
C. Strings
D. All of the above

185. Which of the following command makes the updates performed by the transaction permanent in the database?
A. ROLLBACK
B. COMMIT
C. TRUNCATE
D. DELETE

186. Which command undo all the updates performed by the SQL in the transaction?
A. ROLLBACK
B. COMMIT
C. TRUNCATE
D. DELETE

187. Find all the cities whose humidity is 89
A. SELECT city WHERE humidity = 89;
B. SELECT city FROM weather WHERE humidity = 89;
C. SELECT humidity = 89 FROM weather;
D. SELECT city FROM weather;

188. Find the temperature in increasing order of all cities
A. SELECT city FROM weather ORDER BY temperature;
B. SELECT city, temperature FROM weather;
C. SELECT city, temperature FROM weather ORDER BY temperature;
D. SELECT city, temperature FROM weather ORDER BY city;

189. What is the meaning of LIKE ‘%0%0%’
A. Feature begins with two 0’s
B. Feature ends with two 0’s
C. Feature has more than two 0’s
D. Feature has two 0’s in it, at any position

190. Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy
A. SELECT city, temperature, condition FROM weather WHERE condition NOT IN (‘sunny’, ‘cloudy’);
B. SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN (‘sunny’, ‘cloudy’);
C. SELECT city, temperature, condition FROM weather WHERE condition IN (‘sunny’, ‘cloudy’);
D. SELECT city, temperature, condition FROM weather WHERE condition BETWEEN (‘sunny’, ‘cloudy’);