Sail E0 Webinar

MCQs

Total Questions : 109 | Page 4 of 11 pages
Question 31. The SQL statement
SELECT SUBSTR('abcdefghij', INSTR('123321234', '2', 3, 2), 2) FROM DUAL;
prints
  1.    gh
  2.    23
  3.    bc
  4.    ab
 Discuss Question
Answer: Option A. -> gh
Question 32. The SQL statement
SELECT ROUND(45.926, -1) FROM DUAL;
  1.    is illegal
  2.    prints garbage
  3.    prints 045.926
  4.    prints 50
 Discuss Question
Answer: Option D. -> prints 50
Question 33. Which of the following command makes the updates performed by the transaction permanent in the database?
  1.    ROLLBACK
  2.    COMMIT
  3.    TRUNCATE
  4.    DELETE
 Discuss Question
Answer: Option B. -> COMMIT
Question 34. Which of the following must be enclosed in double quotes?
  1.    Dates
  2.    Column Alias
  3.    Strings
  4.    All of the above
 Discuss Question
Answer: Option B. -> Column Alias
Question 35. Which command undo all the updates performed by the SQL in the transaction?
  1.    ROLLBACK
  2.    COMMIT
  3.    TRUNCATE
  4.    DELETE
 Discuss Question
Answer: Option A. -> ROLLBACK
Question 36. Find all the cities whose humidity is 89
  1.    SELECT city WHERE humidity = 89;
  2.    SELECT city FROM weather WHERE humidity = 89;
  3.    SELECT humidity = 89 FROM weather;
  4.    SELECT city FROM weather;
 Discuss Question
Answer: Option B. -> SELECT city FROM weather WHERE humidity = 89;
Question 37. What is the meaning of LIKE '%0%0%'
  1.    Feature begins with two 0's
  2.    Feature ends with two 0's
  3.    Feature has more than two 0's
  4.    Feature has two 0's in it, at any position
 Discuss Question
Answer: Option D. -> Feature has two 0's in it, at any position
Question 38. Find the temperature in increasing order of all cities
  1.    SELECT city FROM weather ORDER BY temperature;
  2.    SELECT city, temperature FROM weather;
  3.    SELECT city, temperature FROM weather ORDER BY temperature;
  4.    SELECT city, temperature FROM weather ORDER BY city;
 Discuss Question
Answer: Option C. -> SELECT city, temperature FROM weather ORDER BY temperature;
Question 39. Find the names of these cities with temperature and condition whose condition is neither sunny nor cloudy
  1.    SELECT city, temperature, condition FROM weather WHERE condition NOT IN ('sunny', 'cloudy');
  2.    SELECT city, temperature, condition FROM weather WHERE condition NOT BETWEEN ('sunny', 'cloudy');
  3.    SELECT city, temperature, condition FROM weather WHERE condition IN ('sunny', 'cloudy');
  4.    SELECT city, temperature, condition FROM weather WHERE condition BETWEEN ('sunny', 'cloudy');
 Discuss Question
Answer: Option A. -> SELECT city, temperature, condition FROM weather WHERE condition NOT IN ('sunny', 'cloudy');
Question 40. Find the name of those cities with temperature and condition whose condition is either sunny or cloudy but temperature must be greater than 70oF.
  1.    SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' OR temperature > 70;
  2.    SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' OR temperature > 70;
  3.    SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature > 70;
  4.    SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' AND condition = 'cloudy' AND temperature > 70;
 Discuss Question
Answer: Option C. -> SELECT city, temperature, condition FROM weather WHERE condition = 'sunny' OR condition = 'cloudy' AND temperature > 70;

Latest Videos

Latest Test Papers