W06 Study Quiz

Ace your homework & exams now with Quizwiz!

MySQL supports which of these functions (multiple answers possible)?

CEIL() CEILING() FLOOR() ROUND() TRUNCATE()

The EXTRACT() function returns which of the following from a date value (multiple answers possible)?

DAY WEEK MONTH QUARTER YEAR

MySQL uses the concat() function to glue only string data together.

False

The EXTRACT() function returns a string from a date value? (Multiple answers are possible.)

False

The SIGN() function returns NULL when the number is zero.

False

The STRCMP function lets you compare one case sensitive string with another and returns zero when they match and negative one when they don't. SELECT STRCMP('First','Second') AS compared; returns the following: +----------+ | compared | +----------+ | -1 | +----------+ 1 row in set (0.07 sec)

False

The STUFF() function in MySQL lets you insert or replace parts of a string. SELECT STUFF('Goodbye world!', 9, 0,'cruel ') AS farewell; returns the following: +--------------+ | greeting | +--------------+ | Hello world! | +--------------+ 1 row in set (0.00 sec)

False

The chr function lets you access special characters, like accented vowels in the latin1 character set.

False

Resetting the default sql_mode to a value of ansi suppresses the raised error when the string is too long. It then truncates the original string to let it fit in the original column. SET sql_mode='ansi';

True

The CAST() function lets you convert a varchar to a date data type.

True

The CEIL() function rounds up to the nearest integer.

True

The DATE_ADD() function in MySQL lets you add a number of days to a date, like so: SELECT DATE_ADD('2020-12-20', INTERVAL 5 DAY) AS christmas_day; and returns the following: +---------------+ | christmas_day | +---------------+ | 2020-12-25 | +---------------+ 1 row in set (0.00 sec)

True

The DAYNAME() function in MySQL lets you display the day of the week for a date value, like so: SELECT DAYNAME('1941-12-07') AS what_day; and returns the following: +----------+ | what_day | +----------+ | Sunday | +----------+ 1 row in set (0.00 sec)

True

The SIGN() function returns -1 when the number is negative.

True

The TEXT holds a variable-length string for documents up to 4 GB in size.

True

What data type is returned by an ascii() function?

Varchar

MySQL supports which of the following default timestamp formats?

YYYY-MM-DD HH:MI:SS

MySQL supports which these single-argument functions (multiple answers possible)?

acos(x) asin(x) cos(x)

MySQL supports which these single-argument functions? (Multiple answers are possible.)

acos(x) asin(x) cos(x) sin(x)


Related study sets

Microeconomics: private and public choice, ch 5

View Set

Assessment and Management Pt w/ Hepatic Disorders

View Set

Chapter 7: Nucleic Acid Amplification

View Set

Cervical and Thoracic Spine quizzes and unit test

View Set

История Казахстана БТЗ insta: moontheesq KazGASA

View Set

Chapter 19- Disorders of Cardiac Function

View Set