CIS336 Quiz Week 3

$4.00

CIS336 Quiz Week 3
You are creating a table called Department, with fields for the primary key DeptID (Integer) and department name…

 

SKU: CIS336 Quiz Week 3 Categories: , Tags: , , ,

Description

CIS336 Quiz Week 3

CIS336 Quiz Week 3

A+

(TCO 3) The _____ column attribute is used to indicate that a value is required for this field.

DEFAULT

AUTO_INCREMENT

REQUIRED

NOT NULL

(TCO 5) The _____ keyword is used in an ALTER statement to add a new column to an existing table.

MODIFY

ADD

INSERT

DROP

(TCO 3) All of the following values can be stored in a column that’s defined as DECIMAL(6,2) except _____.

-245.88

0

4532.99

24568.02

(TCO 3) The DATETIME data type in MySQL can store _____.

Dates only

Times only

Dates and times

None of the above

(TCO 3) What constraint can only be applied at table level or with an ALTER statement?

Foreign key

Not null

Single field primary key

Composite primary key

(TCO 3) When you build a script for creating tables in a database, _____.

The order that you create the tables does not matter

The order that you create the tables does not matter

You must create parent tables before child tables

You must create parent tables before child tables

(TCO 3) You are creating a table called Department, with fields for the primary key DeptID (Integer) and department name (VARCHAR). What (if anything) is wrong with the following code?

CREATE TABLE Department
(
deptID INTEGER  Primary Key,
deptName VARCHAR(10) NOT NULL,
);

You must use curly braces, not parentheses.

The comma after NOT NULL must be removed.

The keywords cannot be in upper case.

Nothing is wrong.

(TCO 3) What data type is best to store the state abbreviations such as CA?

INTEGER

VARCHAR

DECIMAL

CHAR

(TCO 5) Which statement will add a new column named ORDERDATE to the CUSTOMERS table?

CREATE COLUMN orderdate, DATE ADD to customers;

ALTER TABLE customers ADD COLUMN orderdate DATE;

ALTER TABLE customers ADD orderdate DATE;

MODIFY TABLE customers ADD orderdate DATE;

(TCO 8) When you write an INSERT statement with a column list, which columns can be omitted from the column list?

AUTO_INCREMENT only

DEFAULT only

NOT NULL only

AUTO_INCREMENT, DEFAULT, and fields that allow NULL