SQL
SQL
Which of the names will be displayed by the below given query? SELECT name FROM employee WHERE
employee_id>5009;
(a) Amit, Sumit (b) Sumit, Arpit (c) Arpit (d) Amit, Arpit
9. Consider the following query
SELECT name FROM stu WHERE subject LIKE ‘ Computer Science’;
Which one of the following has to be added into the blank spaces to select the subject which has Computer
Science as its ending string?
(a) $ (b) _ (c) || (d) %
10.Consider following SQL statement. What type of statement is this?
SELECT * FROM employee
(a) DML (b) DDL (c) DCL (d) Integrity constraint
11.Which of the following function is not an aggregate function?
(a) Round() (b) Sum() (c) Count () (d) Avg ()
12.Pick the correct username used for logging in database (sql with Python).
(a) root (b) local (c) directory (d) host
13.Aggregate functions can be used in the select list or the clause of a select statement. They
cannot be used in a clause.
(a) Where, having (b) Having, where (c) Group by, having (d) Group by, where
14.Select correct SQL query from below to find the temperature in increasing order of all cites.
(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;
15.In SQL, which command is used to SELECT only one copy of each set of duplicable rows
(a) SELECT DISTINCT (b) SELECT UNIQUE
(c) SELECT DIFFERENT (d) All of the above
16.Which operator tests column for the absence of data (i.e., NULL value) ?
(a) EXISTS operator (b) NOT operator
(c) IS operator (d) None of these
17.Consider the following query:
SELECT name FROM class WHERE subject _NULL;
Which comparison operator may be used to fill the blank space in above query?
(a) = (b) LIKE (c) IS/IS Not (d) if