DBS Lab Quiz-1 Fall 22
DBS Lab Quiz-1 Fall 22
1. What will happen to the result, if parenthesis are removed IN the following SELECT statement?
SELECT (200+((sal*0.1)/2)) FROM emp;
10. Which of the following statement would change all occurrences of the string 'OPR' to 'RES' in the
loc column of DEPT table?
A) SEELCT TRANSLATE (loc, 'OPR', 'RES') FROM dept;
B) SEELCT CONVERT (loc, 'OPR', 'RES') FROM dept;
C) SEELCT EXTRACT (loc, 'OPR', 'RES') FROM dept;
D) SEELCT REPLACE (loc, 'OPR', 'RES') FROM dept;
11. Which of the following is not a type of SQL statement?
A) Data Definition Language (DDL)
B) Data Control Language (DCL)
C) Data Communication Language (DCL)
D) Data Manipulation Language (DML)
12. What is the output of SUBSTR(‘123456789’, INSTR(‘abcabcabc’, ‘b’), 4)?
A) 2345 C) 456789
B) 6789 D) 1234
13. What is the correct order of precedence?
A) Comparison Operator > NOT > AND > OR
B) Comparison Operator > OR > AND > NOT
C) Comparison Operator > AND > OR > NOT
D) NOT>AND>OR > Comparison Operator
14. What is the default order of Order By clause?
A) Ascending
B) Descending
C) None
D) Both A and B
15. What is the use of ‘||’ in SQL?
A) OR Operator
B) AND Operator
C) For Alias
D) For Concatenation
16. The COUNT function in SQL returns the number of ______________
A) Values
B) Distinct values
C) Group By
D) Columns
17.
1) Display All employees info. whose salaries are greater than 500 and job is manager
2)