Actual Final Pretest and Post test Exam
Questions and Best Graded Solutions latest
2024/2025
What does WHERE identify in a basic SQL SELECT statement?
A A table's intersection data
B The associative entity
C A range of included columns
D The rows to be included - correct answer D
Refer to the given SQL statement.
SELECT EMPNUM
FROM EMPLOYEE
Which line added to the end of the statement returns employee numbers of at least
1000?
A WHERE EMPNUM > 1000;
B WHERE EMPNUM >= 1000;
C WHERE EMPNUM => 1000;
D WHERE EMPNUM = 1000+; - correct answer B
Refer to the given SQL statement.
SELECT PRODNUM, SUM(QUANTITY)
FROM SALESPERSON
,Which line, when added to the end of the statement, returns the total number of each
kind of product by product number?
A ORDER BY PRODNUM;
B GROUP BY PRODNUM;
C COUNT PRODNUM;
D SUM PRODNUM; - correct answer B
Which data definition language statement affects databases or objects in them?
A INSERT
B NULL
C ALTER
D SELECT - correct answer C
What does the DELETE statement do?
A It removes rows from a table.
B It removes views.
C It removes columns not named in the column list.
D It removes columns from a table. - correct answer A
Which condition must be in effect to use the INSERT INTO ... VALUES syntax for an
INSERT statement?
A The VALUES list must contain a value for each non-null valued column in the table.
B The INSERT INTO portion of the statement must refer to a sampdb database table.
C The INSERT INTO portion of the statement must generate a LOAD DATA statement.
,D The VALUES list must contain a value for each row in the table. - correct answer A
Refer to the given SQL statement.
CREATE TABLE mytbl
(
f FLOAT(10,4),
c CHAR(15) NOT NULL DEFAULT 'none',
i TINYINT UNSIGNED NULL
);
Which kind of data type is FLOAT in this statement?
A Decimal
B Data
C String
D Integer - correct answer A
Which two SQL data types can represent images or sounds?
Choose 2 answers
1 FLOAT
2 TERNARY
3 SOUNDBLOB
4 TINYBLOB
5 BINARY
6 INT
, A 4,5
B 1,2 - correct answer A
Refer to the given SQL statement.
CREATE TABLE CUSTOMER
(CustomerIDINT NOT NULL AUTO_INCREMENT,
LastName VARCHAR(100) NOT NULL,
FirstName VARCHAR(100) NOT NULL,
PRIMARY KEY( CustomerID ));
Which component of the command indicates the table's name?
A TABLE CUSTOMER
B CustomerID
C CUSTOMER
D INT - correct answer C
Which method creates an empty copy of a table and then populates it from the original
table?
A CREATE TABLE ... INTO followed by INSERT INTO:
B INSERT TABLE ... LIKE followed by SELECT:
C INSERT TABLE ... SELECT followed by INSERT INTO ... LIKE:
D CREATE TABLE ... LIKE followed by INSERT INTO ... SELECT : - correct answer D
Refer to the given SQL syntax.