Murach's MySQL Ch. 8-9

Réussis tes devoirs et examens dès maintenant avec Quizwiz!

Which uses the least amount of storage?

'ex' stored in a column of type VARCHAR2(20)

What is the result of the function that follows? TRUNCATE(17.87,1)

17.8

If the current date is 2019-02-10, what value is returned by the function that follows? MONTH(CURDATE())

2

What is the result of the function that follows? ROUND(2857.83457, -2)

2857.83

All of the following values can be stored in a column that's defined as DECIMAL(6,2), except

32492.05

What is the result of the function that follows? REGEXP_INSTR('TR1-268-468R', '8-4')

7

Which of the following statements best describes what the following SELECT statement does? SELECT ROW_NUMBER() OVER(PARTITION BY invoice_date ORDER BY invoice_total) AS 'row_number', invoice_date, invoice_total FROM invoices

Assigns a number to each row that indicates the position of the invoice total within the rows for an invoice date.

Which of the following functions returns the smallest integer that is greater than or equal to the number?

CEILING

Which of the following functions would you use to substitute a non-null value for a null value?

COALESCE

Which of the following expressions would you use to display the invoice_total column with a dollar sign, one or more commas, a decimal point, and two decimal digits?

CONCAT('$', FORMAT(invoice_total, 2))

Which of the following functions would you use to calculate the percent of the values in a sorted set of values that are less than or equal to the current value?

CUME_DIST

Which of the following types of real numbers is considered an exact numeric type?

DECIMAL

Which of the following is not true if you use a string in a numeric expression?

If the string doesn't contain any numbers, an error occurs.

Which of the following statements is not true about the CHAR type?

It includes one byte that indicates the actual length of the string.

Which of the following functions would you use to retrieve data from a previous row in a result set?

LAG

Which of the following is not typically used to parse a string into its individual components?

LENGTH

Which of the following functions would you use to find a character in a string?

LOCATE

If the column named float_value is a DOUBLE type, which of the following queries will not return values that are approximately equal to 5?

SELECT float_value FROM float_sample WHERE float_value = 5

The DATE data type can store

dates only

Numbers that don't include a decimal point are known as

integers

The ENUM data type stores values that are mutually exclusive. Which choice is not appropriate for the ENUM type?

mushrooms, sausage, peppers

Which of the following types of data would you not store in a binary large object (BLOB) type?

text files

Which uses the least amount of storage?

they all use the same amount of storage

Which of the following is the default date format for MySQL?

yyyy-mm-dd


Ensembles d'études connexes

Management Information Systems Ch.2 quiz

View Set

Illinois Gifted and Talented Endorsement Practice Questions

View Set

COMD 2050- Chapter 14 (Second Language Acquisition and Learning)

View Set

Chapter 7 Overview of the Financial Audit Process

View Set