SQL Questions & Answers
SQL Questions & Answers
You can add a row using SQL in a database with which of the following?
A
ADD
.
B
CREATE
.
C
INSERT
.
D
MAKE
.
Answer: Option C
B
DROP FROM CUSTOMER ...
.
C
DELETE FROM CUSTOMER WHERE ...
.
D
UPDATE FROM CUSTOMER ...
.
Answer: Option C
B
limits the row data are returned.
.
C
Both A and B are correct.
.
D
Neither A nor B are correct.
.
Answer: Option B
B
To specify the syntax and semantics of SQL manipulation language
.
C
To define the data structures
.
D
All of the above.
.
Answer: Option D
C
An exact match is necessary in a CREATE statement.
.
D
An exact match is not possible in a CREATE statement.
.
Answer: Option B
B
A virtual table that cannot be accessed via SQL commands
.
C
A base table that can be accessed via SQL commands
.
D
A base table that cannot be accessed via SQL commands
.
Answer: Option A
B
DROP TABLE CUSTOMER;
.
C
DELETE TABLE CUSTOMER;
.
D
UPDATE TABLE CUSTOMER;
.
Answer: Option B
B
Data Integrity
.
C
Materialized Views
.
D
All of the above.
.
Answer: Option B
B
DML
.
C
HTML
.
D
XML
.
Answer: Option A
B
CHANGE INDEX ID;
.
C
ADD INDEX ID;
.
D
REMOVE INDEX ID;
.
Answer: Option A
B
IN only
.
C
NOT IN only
.
D
IN and NOT IN
.
Answer: Option A
12. Which of the following is the correct order of keywords for SQL SELECT statements?
A
SELECT, FROM, WHERE
.
B
FROM, WHERE, SELECT
.
C
WHERE, FROM,SELECT
.
D
SELECT,WHERE,FROM
.
Answer: Option A
B
CAPITAL LETTERS.
.
C
parenthesis -- (...) .
.
D
brackets -- [...].
.
Answer: Option C
C
file
.
D
table
.
Answer: Option D
15. Which of the following are the five built-in functions provided by SQL?
A
COUNT, SUM, AVG, MAX, MIN
.
B
SUM, AVG, MIN, MAX, MULT
.
C
SUM, AVG, MULT, DIV, MIN
.
D
SUM, AVG, MIN, MAX, NAME
.
Answer: Option A
16. 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.
.
Answer: Option A
B
Acts like a WHERE clause but is used for rows rather than columns.
.
C
Acts like a WHERE clause but is used for columns rather than groups.
.
D
Acts EXACTLY like a WHERE clause.
.
Answer: Option A
B
percent sign (%); underscore (_)
.
C
underscore(_); question mark (?)
.
D
question mark (?); asterisk (*)
.
Answer: Option B
19. To remove duplicate rows from the results of an SQL SELECT statement, the ________ qualifier specified must be included.
A
ONLY
.
B
UNIQUE
.
C
DISTINCT
.
D
SINGLE
.
Answer: Option C
20. The benefits of a standard relational language include which of the following?
A
Reduced training costs
.
B
Increased dependence on a single vendor
.
C
Applications are not needed.
.
D
All of the above.
.
Answer: Option A
21. 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.
.
Answer: Option D
B
DML
.
C
HTML
.
D
XML
.
Answer: Option B
23. When three or more AND and OR conditions are combined, it is easier to use the SQL keyword(s):
A
LIKE only.
.
B
IN only.
.
C
NOT IN only.
.
D
Both IN and NOT IN.
.
Answer: Option D
B
percent sign (%); underscore (_)
.
C
underscore(_); question mark (?)
.
D
question mark (?); asterisk (*)
.
Answer: Option D
B
ALIGN BY
.
C
ORDER BY
.
D
GROUP BY
.
Answer: Option C
B
GROUP BY.
.
C
ORDER BY.
.
D
None of the above is correct.
.
Answer: Option C
B
use USING to name the source table(s) and list the columns to be shown after SELECT.
.
C
use SELECT to name the source table(s) and list the columns to be shown after USING.
.
D
use USING to name the source table(s) and list the columns to be shown after WHERE.
.
Answer: Option A
29. 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.
.
Answer: Option D
30. The SQL statement that queries or reads data from a table is ________ .
A
SELECT
.
B
READ
.
C
QUERY
.
D
None of the above is correct.
.
Answer: Option A
B
to limit the columns displayed.
.
C
as a wildcard.
.
D
None of the above is correct.
.
Answer: Option A
B
can always be duplicated by a join.
.
C
has a distinct form that cannot be duplicated by a join.
.
D
cannot have its results sorted using ORDER BY.
.
Answer: Option C
C
Microsoft Access
.
D
DBase
.
Answer: Option B
B
an operating system.
.
C
a data sublanguage.
.
D
a DBMS.
.
Answer: Option C