SQL.
SQL.
2. Which of the following SQL functions does not belong to the Math functions
category?
i. POWER()
ii. ROUND()
iii. LENGTH()
iv. MOD()
15
4.
16
7.
8.
17
9.
10.
18
11.
Questions - 2
3. Which one of the following would arrange the rows in ascending order in
SQL ?
(A) SORT BY
(B) ALIGN BY
(C) GROUP BY
(D) ORDER BY
19
5.The SQL string function that returns the index of the first occurrence of
substring is __________ .
6.
7.
20
8.
9.
10.
21
Questions -3
1. Which of the following SQL queries is used to retrieve rows from the "customers"
table where the "email" column contains NULL values?
a. SELECT * FROM customers WHERE email = NULL;
b. SELECT * FROM customers WHERE email IS NOT NULL;
c. SELECT * FROM customers WHERE ISNULL(email);
d. SELECT * FROM customers WHERE email IS NULL;
2. You have a table called "employees" with columns "department" and "salary." You
want to find the highest salary in each department and display the results in
descending order of salary. Which SQL clauses should you use for this query?
a. GROUP BY, HAVING, ORDER BY
b. GROUP BY, ORDER BY
c. HAVING, ORDER BY
d. HAVING, GROUP BY
4. You are working with a database that stores employee information. You need to
retrieve the current date and time. Which SQL function would you use for this purpose?
ii. To findout if ‘@’ symbol is present in the values of email id column or not, which
function out of the following should be used?
7. Clarify the role of the HAVING clause highlighting its distinctions from the WHERE
clause in SQL.
22
8.
9.
10.
23