cis 240 - ch. 8

Lakukan tugas rumah & ujian kamu dengan baik sekarang menggunakan Quizwiz!

All of the following values can be stored in a column that's defined as decimal(6,2), except A) -246.29 B) 0 C) 2479.95 D) 32492.05

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

If you assign a value with one data type to a column with another data type, SQL Server converts the value to the data type of the column using what? A) explicit conversion B) implicit conversion C) Unicode values D) scientific notation

If you assign a value with one data type to a column with another data type, SQL Server converts the value to the data type of the column using what? B) implicit conversion

SQL Server supports ________________ of the ANSI-standard data types A) all B) none C) some, but not all D) one

SQL Server supports ________________ of the ANSI-standard data types C) some, but not all

The difference between the CAST function and the CONVERT function is that the ________________ function accepts an optional style argument that lets you specify a format for the result A) CONVERT B) CAST C) They are both the same D) Neither accepts the optional style argument

The difference between the CAST function and the CONVERT function is that the ________________ function accepts an optional style argument that lets you specify a format for the result A) CONVERT

The integer and decimal data types are considered ________________ because their precision is exact. A) real data types B) approximate numeric data types C) exact numeric data types D) Unicode characters

The integer and decimal data types are considered ________________ because their precision is exact. C) exact numeric data types

The real data type can be used to store a _________________, which provides for numbers with up to 7 significant digits. A) floating-point number B) Unicode C) single-precision number D) double-precision number

The real data type can be used to store a _________________, which provides for numbers with up to 7 significant digits. C) single-precision number

The varchar and nvarchar data types to store variable-length strings. Which of the statements below is true? A) Data stored using these data types occupies only the number of bytes needed to store the string B) They are typically used to define columns with a fixed number of characters. C) In general, they are less efficient than fixed-length strings. D) all of the above

The varchar and nvarchar data types to store variable-length strings. Which of the statements below is true? A) Data stored using these data types occupies only the number of bytes needed to store the string

To code a/an ________________ value as a literal, precede the value with the character N A) ASCII B) fixed-length string C) Unicode D) variable-length string

To code a/an ________________ value as a literal, precede the value with the character N C) Unicode

To express the value of a floating-point number, you can use A) exact numeric data types B) approximate numeric data types C) scientific notation D) Unicode

To express the value of a floating-point number, you can use C) scientific notation

What would 7,800,000,000 be using scientific notation? (where ^ indicates exponent value) B) 7.8 X 10^9 or 7.8E+9

What would 7,800,000,000 be using scientific notation? (where ^ indicates exponent value) A) 7.8 X 10^9 or 78E+9 B) 7.8 X 10^9 or 7.8E+9 C) 7.8 X 10^7 or 7.8E+7 D) 7.8 X 10^8 or 7.8E+8

Which choice below will increase the storage capacity of a varchar column so it can store up to 2 gigabytes of data? A) varchar(large) B) varchar(max) C) varchar XTREME D) varchar(XL)

Which choice below will increase the storage capacity of a varchar column so it can store up to 2 gigabytes of data? B) varchar(max)

Which data types are used to store whole numbers? A) integer B) decimal C) real data D) string

Which data types are used to store whole numbers? A) integer

Which function is typically used to insert control characters into a character string? A) ASCII B) CHAR C) UNICODE D) STR

Which function is typically used to insert control characters into a character string? B) CHAR

Which of the following statements is true about the CONVERT and TRY_CONVERT functions? A) CONVERT can format the result of a conversion, but TRY_CONVERT can't. B) CONVERT can be used with any data type, but TRY_CONVERT can't. C) CONVERT returns an error if the expression can't be converted, but TRY_CONVERT returns a NULL value. D) CONVERT is an ANSI-standard function, but TRY_CONVERT is not.

Which of the following statements is true about the CONVERT and TRY_CONVERT functions? C) CONVERT returns an error if the expression can't be converted, but TRY_CONVERT returns a NULL value.

Which of the following statements is true? A) Implicit data type conversion is performed when you mix values of different data types in an expression. B) Every data type can be implicitly converted to every other data type. C) Values are implicitly converted from the data type with higher precedence to the data type with lower precedence. D) You can convert a data type implicitly by using either the CAST or the CONVERT function.

Which of the following statements is true? A) Implicit data type conversion is performed when you mix values of different data types in an expression.

Which uses the least amount of storage? A) 'example' stored in a column of type varchar(20) B) 'exam' stored in a column of type varchar(20) C) 'ex' stored in a column of type varchar(20) D) they all use the same amount of storage

Which uses the least amount of storage? C) 'ex' stored in a column of type varchar(20)

Write the code for an ORDER BY clause that sorts a table into numeric sequence by the data in the PartCode column if that column contains whole numbers that are stored with the varchar data type. A) ORDER BY CAST (PartCode AS decimal) B) ORDERBY CAST (PartCode) C) ORDER BY CAST (PartCode AS int) D) none of the above

Write the code for an ORDER BY clause that sorts a table into numeric sequence by the data in the PartCode column if that column contains whole numbers that are stored with the varchar data type. C) ORDER BY CAST (PartCode AS int)

Write the code for casting a decimal field named InvoiceAmount to a varchar datatype using the CAST function A) CAST (varcharDate, InvoiceAmount) AS varchar B) CAST (InvoiceAmount AS varchar) C) CAST (varcharDate, InvoiceAmount, 107.25) as varchar D) CAST (InvoiceAmount = varchar)

Write the code for casting a decimal field named InvoiceAmount to a varchar datatype using the CAST function B) CAST (InvoiceAmount AS varchar)

You can use what data type to store a date that includes a time zone offset? A) time B) smalldatetime C) datetime D) datetimeoffset

You can use what data type to store a date that includes a time zone offset? D) datetimeoffset

____________________ characters can be used to encode most of the characters in most of the languages of the world. A) ASCII B) fixed-length string C) Unicode D) variable-length string

____________________ characters can be used to encode most of the characters in most of the languages of the world. C) Unicode


Set pelajaran terkait

Foundations Quiz 2 study practice problems

View Set

Myoelastic Aerodynamics Theory of Voice Production

View Set

PrepU ch.2 subjective data: health history

View Set

Anatomy & Physiology II: Homework #2 (Hormones & Endocrine System)

View Set

Chapter 46. Poetry in Motion: Tchaikovsky and the Ballet

View Set