CIS 407 Practice Questions

Ace your homework & exams now with Quizwiz!

Which statement is used to modify the structure of an existing table?

ALTER TABLE

Which statement do you use to modify an existing view?

ALTER VIEW

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

CONVERT

Each of the following column attributes is a column constraint, except

DEFAULT

Write the code for a DELETE statement that deletes every row in the Vendors table

DELETE Vendors;

To test whether one or more rows are returned by a subquery, you can use which operator?

EXISTS

A subquery can be coded in a WHERE, FROM, SELECT, or ______________ clause.

HAVING

A collation can affect all of the following except one. Which one?

How character data is concatenated

Which of the following statements is true?

Implicit data type conversion is performed when you mix values of different data types in an expression.

A subquery is a/an ______________ statement that's coded within another SQL statement.

SELECT

A view is a/an ________________ statement that's stored as an object in the database.

SELECT

What attribute can you use to optimize storage when coding the definition for a column that will contain a high percentage of null values?

SPARSE

You use the UPDATE statement to modify one or more rows in the table named in the ________________ clause.

UPDATE

Which of the following can you use to create or modify a view in SQL Server Management Studio?

View Designer

When you code a DELETE statement for one or more rows, which clause specifies which row or rows are to be deleted?

WHERE

You specify the conditions that must be met for a row to be deleted in the which clause?

WHERE

Each of the following is a benefit provided by using views except for one. Which one is it?

You can create a view that simplifies data insertion by hiding a complex INSERT statement within the view.

If introduced as follows, the subquery can return which of the values listed below?WHERE InvoiceTotal > ALL (subquery)

a column of one or more rows

If introduced as follows, the subquery can return which of the values listed below?WHERE 2 < (subquery)

a single value

When you identify a column as the primary key, the column

all of the above

You can code views that: Join tables summarize data use subqueries all of the above

all of the above

You use data definition language (DDL) to create, modify, and delete the ________________ of a database.

all of the above

The first character of a regular identifier can be

any of the above

What kind of constraint limits the values that can be stored in a column?

check constraint

When you use the CREATE TABLE statement to create a table, you can also define the attributes and ______________ for the columns.

constraints

The CREATE TABLE statement

creates a new table in the current database

To store a date value without storing a time value, you can use the

date data type

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

datetimeoffset

Which data types are used to store whole numbers?

integer

A correlated subquery is one that

is executed once for each row in the outer query

When you code a column list in an INSERT statement, you can omit identity columns, columns that have default values, and columns that allow __________ values.

null

The WITH CHECK option of the CREATE VIEW statement

prevents an update from being performed through the view if it causes a row to no longer be included in the view

The WITH ENCRYPTION clause of the CREATE VIEW statement

prevents users from seeing the code that defines the view

An index improves performance when SQL Server

searches a table

In an UPDATE statement, the WHERE clause will

specifiy the condition a row must meet to be updated

To insert several rows selected from another table into a table, you can code an INSERT statement with a/an ______________ in place of the VALUES clause.

subquery

When you define a foreign key constraint, you can specify all but one of the following. Which one is it?

that the insertion of a row in a foreign key table that has a foreign key that isn't matched in the primary key table should be cascaded up to the primary key table

When you code a script for creating a database,

you need to create the referred to tables before you create the tables that refer to them


Related study sets

Haustiere - zwierzęta i opieka nad nimi

View Set

Sensory perception practice questions

View Set

Small Animal Surgical Nursing Ch 2

View Set

Chapter 14: Shock and Multiple Organ Dysfunction Syndrome

View Set

chapter 2 Concepts of Health, Illness, Stress, and Health Promotion

View Set

Ch 13: Personal Selling and Sales Promotion DSM

View Set