ALL RIGHTS RESERVED.
CIT 111 Final Exam Prep Questions With
Verified Answers
You can use the AS keyword with the CREATE TABLE statement to create a copy of a table
from a ____________________ statement. - Answers✔SELECT
When you code a column list in an INSERT statement, you can omit columns with default values
and columns that allow ____________________________ values. - Answers✔NULL
If you code a column list in an INSERT statement that includes a column that's defined with a
default value, you can insert the default value for that column by coding the
____________________ keyword in the VALUES clause of the INSERT statement. -
Answers✔DEFAULT
By default, MySQL automatically commits changes to the database immediately after each
INSERT, UPDATE, and ______________ statement that you issue - Answers✔DELETE
Which uses the least amount of storage?
'example' stored in a column of type VARCHAR2(20)
'exam' stored in a column of type VARCHAR2(20)
'ex' stored in a column of type VARCHAR2(20)
they all use the same amount of storage - Answers✔'ex' stored in a column of type
VARCHAR2(20)
The _____________________ function is an ANSI-standard function that you can use to
perform an explicit conversion. - Answers✔CAST
In MySQL 5.6 the CHAR and VARCHAR2 data types use which character set?
A) Latin1
B) UTF-8
C) ASCII
, ©THEBRIGHT EXAM SOLUTIONS 2024/2025
ALL RIGHTS RESERVED.
D) ISO 8859
E) UTF-16 - Answers✔B) UTF-8
If you want to store a decimal number you must use the FLOAT data type.
True
False - Answers✔False
The best data type for a standard zip code (e.g. 83440) is:
A) INT
B) NUMBER(5, 0)
C) CHAR(5)
D) CHAR(25)
E) VARCHAR(5)
F) VARCHAR(25) - Answers✔C) CHAR(5)
This expression returns what:
SUBSTRING('Hello World', 5)
A) 'o World'
B) 'Hello'
C) Error Msg: Too few arguments
D) 'World'
E) NULL - Answers✔A) 'o World' *start at position 5*
The EXTRACT function can be used to parse a date?
True
False - Answers✔True
Which of the following functions are useful when dealing with nulls? (Select all that apply)
A) IFNULL
B) NVL
C) COALESCE
, ©THEBRIGHT EXAM SOLUTIONS 2024/2025
ALL RIGHTS RESERVED.
D) ISNULL
E) NVL2 - Answers✔A) IFNULL
C) COALESCE
The default date format for MySQL is:
A) '2014-08-19'
B) '8/19/14'
C) 'August 19, 2014'
D) '19-AUG-14' - Answers✔A) '2014-08-19'
DECIMAL(5,2) can hold which of the following values:
A) 23500.78
B) -23500.78
C) 50.78
D) 50.783
E) 730.00
F) -730.00 - Answers✔C) 50.78
E) 730.00
F) -730.00
The DATE data type can store time as well as date information?
True
False - Answers✔False
Which uses the least amount of storage?
'example' stored in a column of type CHAR2(20)
'exam' stored in a column of type CHAR2(20)
'ex' stored in a column of type CHAR2(20)
they all use the same amount of storage - Answers✔they all use the same amount of storage
, ©THEBRIGHT EXAM SOLUTIONS 2024/2025
ALL RIGHTS RESERVED.
Numbers that include a decimal point are knows as ____________________. - Answers✔real
numbers
When searching for floating point numbers such as the DOUBLE and FLOAT types, you'll want
to search for ______________ values. - Answers✔approximate
If an error occurs, each of the numeric functions returns a/an ____________ value. -
Answers✔null
To format TIME values, you use the _______________ function. - Answers✔TIME_FORMAT
You use the ______________ function to add a specified number of date parts to a date. -
Answers✔DATE_ADD
The ___________ function returns the string with any leading spaces removed. -
Answers✔LTRIM
Write the code for a DELETE statement that deletes every row in the Invoices_Copy table: -
Answers✔DELETE FROM(Invoices_Copy)
When you code an UPDATE statement for one or more rows, the SET clause names the columns
to be updated and the values to be assigned to those columns, and the ______________________
clause specifies the conditions a row must meet to be updated. - Answers✔WHERE
The DATETIME data type includes not only the date, but also a ________________________. -
Answers✔time
The DATE data type can store
dates only
dates and times
times only
all of the above - Answers✔dates only
Write the code for converting the DATE data type in a column named invoice_date to the
DATETIME data type: - Answers✔CAST(invoice_date AS DATETIME)
The __________ function returns the smallest integer that is greater than or equal to the number.
FLOOR
TRUNCATE