Quiz
SQL
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (32)
1180. To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.
- AONLY
- BUNIQUE
- CDISTINCT
- DSINGLE
2179. Which of the following are the five built-in functions provided by SQL?
- ACOUNT, SUM, AVG, MAX, MIN
- BSUM, AVG, MIN, MAX, MULT
- CSUM, AVG, MULT, DIV, MIN
- DSUM, AVG, MIN, MAX, NAME
3178. The result of a SQL SELECT statement is a(n) ________ .
- Areport
- Bform
- Cfile
- Dtable
4Which of the following is the correct order of keywords for SQL SELECT statements?
- ASELECT, FROM, WHERE
- BFROM, WHERE, SELECT
- CWHERE, FROM,SELECT
- DSELECT,WHERE,FROM
5176. The command to eliminate a table from a database is:
- Ao REMOVE TABLE CUSTOMER;
- B• DROP TABLE CUSTOMER;
- Co DELETE TABLE CUSTOMER;
- Do UPDATE TABLE CUSTOMER;
6175. The wildcard in a WHERE clause is useful when?
- Ao An exact match is necessary in a SELECT statement.
- B• An exact match is not possible in a SELECT statement.
- Co An exact match is necessary in a CREATE statement.
- Do An exact match is not possible in a CREATE statement.
7174. Which of the following is the original purpose of SQL?
- Ao To specify the syntax and semantics of SQL data definition language
- Bo To specify the syntax and semantics of SQL manipulation language
- Co To define the data structures
- D• All of the above
8173. The SQL WHERE clause:
- Ao limits the column data that are returned.
- B• limits the row data are returned.
- Co Both A and B are correct.
- Do Neither A nor B are correct.
9172. The command to remove rows from a table 'CUSTOMER' is:
- Ao REMOVE FROM CUSTOMER ...
- Bo DROP FROM CUSTOMER ...
- C• DELETE FROM CUSTOMER WHERE ...
- Do UPDATE FROM CUSTOMER ...
10171. You can add a row using SQL in database with which of the following?
- Ao ADD
- Bo CREATE
- C• INSERT
- Do MAKE
11170. Constraints always have a name.
- ATrue
- BFalse
12169. Which of the following statements is NOT true?
- Ao SQL statements are no case sensitive
- Bo Keywords cannot be abbreviated
- C• SQL statement can be only one line
- Do Keywords cannot be split across lines
13168. You can update only a single column at a time in a table.
- ATrue
- BFalse
14167. Consider the EMPLOYEES table. Which condition in the WHERE clause limit the employees to those who work in the department prompted by the user?
- AWHERE department_id = ‘%Department’
- BWHERE department_id LIKE ‘%Department’
- CWHERE department_id = ‘&Department’
- DWHERE department_id like ‘_Department’
15166. Which of the following functions joins two strings together?
- A• CONCAT
- Bo TRIM
- Co INSTR
- Do SUBSTR
16165. Queries that return only one row from the inner SELECT statement are called
- Ao Multiple-column subqueries
- B• Single-row subqueries
- Co Single-column subqueries
- Do Multiple-row subqueries
17164. By default, the foreign key restricts deletes of any parent row that has a corresponding child row(s).
- ATrue
- BFalse
18163. A DISTINCT must always be user in the top-most SELECT statement of a set operation
- ATrue
- BFalse
19162. When executed, this statement cannot be rolled back
- Ao ALTER TABLE
- B• DROP TABLE
- Co REMOVE TABLE
- Do DELETE TABLE
20161. The UNION and UNION ALL set operator have the opposite effect other.
- ATrue
- BFalse
21160. DML statement such as INSERT, UPDATE, DELETE, and MERGE obtain a lock on the row(s), so other users cannot manipulate it.
- ATrue
- BFalse
22159. You can rename a table with the RENAME or the ALTER TABLE command.
- ATrue
- BFalse
23158. Consider the EMPLOYEES table. Which of the following statements count the number of employees within each department?
- A• SELECT department_id, COUNT(last_name) FROM employees GROUP BY department_id
- Bo SELECT department_name, COUNT(last_name) FROM employees GROUP BY department_id
- Co SELECT department_id, department_name, COUNT(last_name) FROM employees GROUP BY department_id
- Do SELECT department_id, COUNT(last_name) FROM departments GROUP_BY last_name
24157. Which of the following functions is not single-row function?
- Ao CONCAT
- B• SUM
- Co UPPER
- Do ROUND
25156. Which of the following clauses is used to limit the rows that are retrieved by the query?
- A• WHERE
- Bo ORDER BY
- Co FROM
- Do GROUP BY
26155. When inserting data into a table form another table, the table names and columns must be the same.
- ATrue
- BFalse
27154. You can place the subquery in a number of SQL clauses, including the following:
I. WHERE clause
II. HAVING clause
III. FROM clause- Ao I and II
- B• I,II and III
- Co I only
- Do I and III
28153. Privileges, roles, and synonyms are all used to implement security in an Oracle database
- ATrue
- BFalse
29152. What will be the result of the following SQL statement?
SELECT INITCAP(SUBSTR(CONCAT(‘Hello’,world),4,3)) FROM DUAL;- Ao LLO
- Bo Llo
- C• Low
- Do LOW
30151. The ______ operator compares a value to every value returned by a subquery.
- Ao NOT
- B• ALL
- Co SOME
- Do ANY
31150. Which command is used to view the structure of the table LOCATIONS?
- A• DESCRIBE LOCATIONS
- Bo SHOW STRUCTURE LOCATIONS
- Co SELECT * FROM LOCATIONS
- Do PRINT LOCATIONS
32149. Which keyword is used to provide an alias to a column?
- Ao COLUMN
- B• AS
- Co ALIAS
- Do IS
Information
- Description
- Quiz on SQL, created by Muratbay Almurzaev on 13/12/2017.
- Author
- Muratbay Almurzaev
- Language
- English
- Views
- 3
- Rating
- No ratings yet Rate this quiz