• Post author:
  • Post category:Computer

221. A subquery in an SQL SELECT statement is enclosed in:
A. parenthesis — (…).
B. brackets — […].
C. CAPITAL LETTERS.
D. braces — {…}.

222. The result of a SQL SELECT statement is a ________ .
A. file
B. report
C. table
D. form

223. In an SQL SELECT statement querying a single table, according to the SQL-92 standard the asterisk (*) means that:
A. all columns of the table are to be returned.
B. all records meeting the full criteria are to be returned.
C. all records with even partial criteria met are to be returned.
D. None of the above is correct.

224. The HAVING clause does which of the following?
A. Acts EXACTLY like a WHERE clause.
B. Acts like a WHERE clause but is used for columns rather than groups.
C. Acts like a WHERE clause but is used for groups rather than rows.
D. Acts like a WHERE clause but is used for rows rather than columns.

225. Which of the following do you need to consider when you make a table in SQL?
A. Data types
B. Primary keys
C. Default values
D. All of the above.

226. When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):
A. NOT IN only.
B. LIKE only.
C. IN only.
D. Both IN and NOT IN.

227. SQL can be used to:
A. create database structures only.
B. query database data only.
C. modify database data only.
D. All of the above can be done by SQL.

228. The SQL keyword BETWEEN is used:
A. to limit the columns displayed.
B. for ranges.
C. as a wildcard.
D. None of these is correct.

229. Which of the following query is correct for using comparison operators in SQL?
A. SELECT name, course_name FROM student WHERE age>50 and <80;
B. SELECT name, course_name FROM student WHERE age>50 and age <80;
C. SELECT name, course_name FROM student WHERE age>50 and WHERE age<80;
D. None of these

230. How to select all data from student table starting the name from letter ‘r’?
A. SELECT * FROM student WHERE name LIKE ‘r%’;
B. SELECT * FROM student WHERE name LIKE ‘%r%’;
C. SELECT * FROM student WHERE name LIKE ‘%r’;
D. SELECT * FROM student WHERE name LIKE ‘_r%’