Database 3

Ace your homework & exams now with Quizwiz!

A primary key always comprises a single column

False

After the word FROM in a SELECT statement, you list any conditions (restrictions) that apply to the data you want to retrieve.

False

All SELECT statements require a WHERE clause.

False

If the CREATE TABLE command is executed more than once for the same table, MySQL overwrites the table with the newest data description.

False

If you added a row that should not be in a table, use a REMOVE command to remove it.

False

In a SELECT statement, the FROM clause and the WHERE clause (when used) must appear on separate lines.

False

In the SELECT clause, you can use the ____ symbol to indicate that you want to include all columns.

*

MySQL does not require a password.

False

The only arithmetic operators that can be used in SELECT statements are + for addition and - for subtraction.

False

SQL character data format is/are ____.

CHAR and VARCHAR

You cannot assign names to computed columns.

False

You cannot change the order of the columns to be displayed in query results.

False

The SQL command that lets you insert data into a table, one row at a time, is ____.

INSERT

The ____ data type is used to store integers.

INT

The ____ operator finds rows that do not contain a null value in the specified column

IS NOT NULL

You use the ____ clause to list data in a specific order.

ORDER BY

Which of the following is the primary key of the ORDER_LINE (ORDER_NUM, PART_NUM, NUM_ORDERED, QUOTED_PRICE) table?

ORDER_NUM and PART_NUM

The basic SQL aggregate function that gives the arithmetic mean for the specific column is ____.

AVG

The ____ command defines a table's structure by listing its columns, data types, and column lengths.

CREATE TABLE

The correct data type for the BALANCE column in the CUSTOMER table is ____.

DECIMAL

To delete a row from the PRODUCT table, use the ____ command.

DELETE

Which command would be used to delete the table row where the P_Code = '2238/QPD'?

DELETE FROM PRODUCT WHERE P_CODE = '2238/QPD';

The ____ clause is used to produce a list of only values that are different from one another.

DISTINCT

A table can be deleted from the database by using the ____ command.

DROP

The ____ command is used to modify the table by deleting a column.

DROP

In SQL, you use the ____ command to query a database.

SELECT

The SQL command that lets you list the table contents is ____.

SELECT

What is the command used to list the P_CODE, P_DESCRIPT, P_INDATE, and P_PRICE fields from the Product table in ascending order by P_PRICE?

SELECT P_CODE, P_DESCRIPT, P_INDATE, P_PRICE FROM PRODUCT ORDER BY P_PRICE;

The basic form of the SQL SELECT command is ____.

SELECT-FROM-WHERE

Which of the following is a valid name for a table?

TBL_1

In SQL, you use the NOT NULL clause in a CREATE TABLE command to indicate columns that cannot contain null values.

True

In a relational database, relationships are implemented by having common columns in two or more tables.

True

It is possible to place one query inside another.

True

Preceding a condition by the NOT operator reverses the truth of the original condition.

True

The CREATE DATABASE command is executed only once for a database.

True

The USE command is executed at the start of every session to activate the database.

True

The data type DECIMAL(5,2) represents a number with three places to the left and two places to the right of the decimal.

True

The data type indicates the type of data that a column can contain as well as the maximum number of characters or digits that the column can store.

True

The SQL command that enables you to make changes in the data is ____.

UPDATE

To make data entries in an existing row's columns, SQL employs the ____ command.

UPDATE

Which of the following commands changes the value in a column?

UPDATE

Which command would you use when making corrections to the PRODUCT table?

UPDATE PRODUCT SET P_INDATE = '01/18/2004' WHERE P_CODE = '13-Q2/P2';

In MySQL, dates have the form ____.

YYYY-MM-DD

To display all the rows and columns in a table, type the word SELECT, followed by a(n) ____, followed by the word FROM and then the name of the table containing the data you want to view.

asterisk

During the ER modeling process, the designer must ____.

make decisions about adding attributes to satisfy processing requirements

Producing the required information flow, introducing changes, and making enhancements are part of the ____ phase.

operation and maintenance and evolution

When a script file contains more than one command, each command must end with a ____.

semicolon

You indicate the end of a command by typing a(n) ____.

semicolon

For any column whose data type is CHAR, values must be enclosed in ____.

single quotation marks


Related study sets

Final questions for into to Health/PE/Recreation

View Set

PNE 101 LEC. Ch. 38 End-of-Life Care. Fundamentals Nursing Skills & Concepts. Timby 11th Ed.

View Set

Unit 1 Lesson 4 Decision-MakingSkills

View Set

Abnormal Psych Ch. 6 Anxiety Disorders

View Set

اجتماعيات للصف التاسع منهج كويتي

View Set

Adverbs, Adjectives, Pronouns, Nouns, Verbs and Prepositions

View Set

Chapter 6 Bone Tissue and the Skeleton System Test

View Set

Chapter 13 Psychology Inquizitive Q&A

View Set

Unit 4 Control of Microorganisms

View Set