My SQL MCQ
My SQL MCQ
My SQL MCQ
3. Which one of the following uniquely identifies the tuples / rows in a relation.
a.Secondary Key (b) Primary Key (c) Composite Key (d) Foreign Key
5. Which of the following is a group of one or more attributes that uniquely identifies a row?
(b) Key (b) Determinant (c) Tuple(d) Relation
10. In SQL, which of the following will select only one copy of each set of duplicate rowsfrom a table.
a)SELECT UNIQUE b) SELECT DISTINCT c)SELECT DIFFERENT d)All of these.
11. Which of the following keywords will you use in the following query to display the unique
values of the column dept_name?
SELECT dept_name FROM COMPANY;
a.All (b) From (c) Distinct (d) Name
12. The clause of SELECT query allows us to select only those rows in the result that
satisfy a specified condition.
a.where (b) from (c) having (d) like
13. Which operator can take wild card characters for query condition?
(a) BETWEN (b) LIKE (c) IN (d) NOT
15. Which of the following SQL commands retrives data from table(s) ?
a.UPDATE (b) SELECT (c) Union (d) All of these
60. If column “salary” contains the data set (45000, 5000, 55000, 45000, 55000), what will be the output after the
execution of the given query?
SELECT AVG (DISTINCT salary) FROM employee;
(A) 38500 (B) 40000 (C) 41000 (D) 35000
61. The correct SQL from below to 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 ;