CIT 111 Final Exam Prep Questions And 100%
Verified Answers (A+)
You can use the AS keyword with the CREATE TABLE statement to create a copy of a
table from a ____________________ statement. - ANSWER SELECT
When you code a column list in an INSERT statement, you can omit columns with default
values and columns that allow ____________________________ values. - ANSWER 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. -
ANSWER DEFAULT
By default, MySQL automatically commits changes to the database immediately after
each INSERT, UPDATE, and ______________ statement that you issue - ANSWER 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 - ANSWER '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. - ANSWER CAST
In MySQL 5.6 the CHAR and VARCHAR2 data types use which character set?
,A) Latin1
B) UTF-8
C) ASCII
D) ISO 8859
E) UTF-16 - ANSWER B) UTF-8
If you want to store a decimal number you must use the FLOAT data type.
True
False - ANSWER 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 - ANSWER 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 - ANSWER A) 'o World' *start at position 5*
,The EXTRACT function can be used to parse a date?
True
False - ANSWER True
Which of the following functions are useful when dealing with nulls? (Select all that
apply)
A) IFNULL
B) NVL
C) COALESCE
D) ISNULL
E) NVL2 - ANSWER 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' - ANSWER 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 - ANSWER C) 50.78
E) 730.00
, F) -730.00
The DATE data type can store time as well as date information?
True
False - ANSWER 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 - ANSWER they all use the same amount of
storage
Numbers that include a decimal point are knows as ____________________. - ANSWER real
numbers
When searching for floating point numbers such as the DOUBLE and FLOAT types, you'll
want to search for ______________ values. - ANSWER approximate
If an error occurs, each of the numeric functions returns a/an ____________ value. -
ANSWER null
TIME values are formatted using the _______________ function. - ANSWER TIME_FORMAT
Adds a specified number of date parts to a date using the ______________ function. -
ANSWER DATE_ADD
The ___________ function returns the string with any leading spaces removed. - ANSWER
Verified Answers (A+)
You can use the AS keyword with the CREATE TABLE statement to create a copy of a
table from a ____________________ statement. - ANSWER SELECT
When you code a column list in an INSERT statement, you can omit columns with default
values and columns that allow ____________________________ values. - ANSWER 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. -
ANSWER DEFAULT
By default, MySQL automatically commits changes to the database immediately after
each INSERT, UPDATE, and ______________ statement that you issue - ANSWER 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 - ANSWER '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. - ANSWER CAST
In MySQL 5.6 the CHAR and VARCHAR2 data types use which character set?
,A) Latin1
B) UTF-8
C) ASCII
D) ISO 8859
E) UTF-16 - ANSWER B) UTF-8
If you want to store a decimal number you must use the FLOAT data type.
True
False - ANSWER 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 - ANSWER 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 - ANSWER A) 'o World' *start at position 5*
,The EXTRACT function can be used to parse a date?
True
False - ANSWER True
Which of the following functions are useful when dealing with nulls? (Select all that
apply)
A) IFNULL
B) NVL
C) COALESCE
D) ISNULL
E) NVL2 - ANSWER 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' - ANSWER 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 - ANSWER C) 50.78
E) 730.00
, F) -730.00
The DATE data type can store time as well as date information?
True
False - ANSWER 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 - ANSWER they all use the same amount of
storage
Numbers that include a decimal point are knows as ____________________. - ANSWER real
numbers
When searching for floating point numbers such as the DOUBLE and FLOAT types, you'll
want to search for ______________ values. - ANSWER approximate
If an error occurs, each of the numeric functions returns a/an ____________ value. -
ANSWER null
TIME values are formatted using the _______________ function. - ANSWER TIME_FORMAT
Adds a specified number of date parts to a date using the ______________ function. -
ANSWER DATE_ADD
The ___________ function returns the string with any leading spaces removed. - ANSWER