Deck 3: Creating Tables

Full screen (f)
exit full mode
Question
Table names cannot contain spaces.
Use Space or
up arrow
down arrow
to flip the card.
Question
To move back one or more pages in Oracle Database Express, click the pages in the task bar.
Question
When adding rows to character columns, make sure you enclose the values in single quotation marks.
Question
When you enter a new row into a table or modify an existing row, the values for one or more columns can be unknown or unavailable.
Question
Dropping a table also deletes any data that you entered into the table.
Question
To enter a null value into a table, you use a special format of the NULL command.
Question
The data type indicates the type of data that a column can contain.
Question
In general, SQL is case-sensitive.
Question
To run SQL commands in Access, you must first create a new query.
Question
In Access, it is common to create a table using SQL.
Question
Microsoft SQL Server 2005 is a DBMS designed for use in client-server applications.
Question
SQL was developed as the data manipulation language for IBM's prototype relational model DBMS, System R.
Question
Unlike Oracle, Access does not support the DECIMAL data type.
Question
This text uses Oracle Database Express Edition as the DBMS in which to create and run SQL commands.
Question
In Oracle, the data type STRING(n) stores a character string n characters long.
Question
In SQL, there are special rules that specify that a particular word must begin in a particular position on the line.
Question
The data type DECIMAL(5,2) represents a number with three places to the left and two places to the right of the decimal.
Question
In Oracle, the date, November 12, 2010 would be stored as '12-NOV-2010'.
Question
To create a table, type the word TABLE followed by the name of the table to be created and then by the names and data types of the columns that will comprise the table.
Question
In SQL, you cannot enter an apostrophe into a column whose type is character (CHAR).
Question
The ____ data type is used to store integers.

A) INTEGER
B) NUMERAL
C) NUMBER
D) INT
Question
In SQL Server, execute the sp_columns command to list all the columns in a table.
Question
To view data in a table, use the VIEW command.
Question
What is the original name of SQL?

A) SEQUEL
B) MYSEQUEL
C) DBase
D) MySQL
Question
In Oracle, dates have the form ____.

A) DD-MON-YY
B) MON-DD-YY
C) YYYY-MON-DD
D) DD-MON-YYYY
Question
If you added a row that should not be in a table, use a REMOVE command to remove it.
Question
In SQL, table names cannot exceed ____ characters.

A) 12
B) 14
C) 24
D) 30
Question
The DESCRIBE TABLE command defines a table's structure by listing its columns, data types, and column lengths.
Question
In Access, dates have the form ____.

A) DD/MM/YY
B) MM/DD/YYYY
C) YYYY/MON/DD
D) DD/MON/YYYY
Question
To list all the columns in a table, use the LIST COLUMNS command.
Question
SQL was developed in the mid-____.

A) 1960s
B) 1970s
C) 1980s
D) 1990s
Question
To delete an entire table, use the ____ command and then re-create the table.

A) REMOVE TABLE
B) DELETE TABLE
C) ERASE TABLE
D) DROP TABLE
Question
Which of the following is a valid name for a table?

A) TBL_1
B) 2_TBL
C) TBL 3
D) 4 tbl
Question
To change a value in a table, use the CHANGE command.
Question
You indicate the end of a command by typing a ____.

A) column
B) comma
C) semicolon
D) period
Question
Access does not use script files.
Question
The Oracle Database Express edition allows you to save a command so you can use it again without retyping it.
Question
In Access, use the Documenter tool to describe the tables in a database.
Question
If your screen displays the SQL Commands page, the Home>SQL>SQL Commands reference at the top of the SQL editor pane is called a ____.

A) command sequence
B) page sequence
C) breadcrumb
D) page trail
Question
Oracle stores script files is a special location called Saved Commands.
Question
You can use the ____________________ data type to store date data.
Question
SQL is Structured ____________________ Language.
Question
In Oracle 10G Express, you enter commands on the SQL ____________________ page.
Question
The ____________________ data type stores integers but uses less space than the INT data type.
Question
Which of the following commands changes the value in a column?

A) UPDATE
B) CHANGE
C) REPLACE
D) ADD
Question
The data type DECIMAL(5,2) represents a number with ____________________ places to the left and two places to the right of the decimal.
Question
The ____ data type stores only the actual character string.

A) CHAR
B) VARCHAR
C) TEXT
D) STRING
Question
A ____ file is a text file with a .sql extension that contains SQL commands.

A) command
B) batch
C) sequel
D) script
Question
Use the ____ data type for columns that contain letters and special characters and for columns containing numbers that will not be used in calculations.

A) CHAR
B) CHARACTER
C) TEXT
D) STRING
Question
Access does not support the ____ data type.

A) DECIMAL
B) CURRENCY
C) INT
D) NUMBER
Question
The ____ command defines a table's structure by listing its columns, data types, and column lengths.

A) NEW TABLE
B) DEFINE TABLE
C) CREATE TABLE
D) ADD TABLE
Question
You use the ____________________ command to describe the layout of a table.
Question
In Oracle 10 G Express, the results of a SQL command appear in the ____________________ pane.
Question
In Oracle 10 G Express, you enter a command in the SQL editor pane and then click the ____________________ button to execute the command.
Question
In this text, SQL commands are illustrated using ____________________.
Question
For any column whose data type is CHAR, values must be enclosed in ____.

A) double quotation marks
B) parentheses
C) single quotation marks
D) square brackets
Question
The correct data type for the BALANCE column in the CUSTOMER table is ____.

A) CHAR
B) INT
C) SMALLINT
D) DECIMAL
Question
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.

A) single quote
B) asterisk
C) double quote
D) slash
Question
You can delete the entire table using the ____________________ TABLE command.
Question
When a script file contains more than one command, each command must end with a(n) ____.

A) apostrophe
B) semicolon
C) period
D) colon
Question
To view the data in a table, you use the ____________________ command.
Question
A file containing SQL commands is called a(n) ____________________ file.
Question
You can use a special value to represent situations in which an actual value is unknown, unavailable, or not applicable. This special value is called a(n) ____________________ data value.
Question
You must enclose values in ____________________ quotation marks for any column whose type is character (CHAR), even when the data contains numbers.
Question
How can you correct errors in data?
Question
In Oracle, what is the script repository?
Question
In Oracle, use the ____________________ command to list all columns in a table and their properties.
Question
What are the common restrictions placed on table and column names?
Question
In Access, use the ____________________ tool to describe the tables and other objects in a database.
Question
The ____________________ command adds rows to a table.
Question
To indicate columns that cannot contain null values, use the ____________________ clause in a CREATE TABLE statement.
Question
If you need to delete a row from a table, you can use the ____________________ command.
Question
Should a user be allowed to enter null values for the primary key?
Question
Why does the ZIP column in the REP table have a data type of CHAR, if a ZIP Code is made up of numbers?
Question
You can use the ____________________ command to update a value in a table.
Unlock Deck
Sign up to unlock the cards in this deck!
Unlock Deck
Unlock Deck
1/75
auto play flashcards
Play
simple tutorial
Full screen (f)
exit full mode
Deck 3: Creating Tables
1
Table names cannot contain spaces.
True
2
To move back one or more pages in Oracle Database Express, click the pages in the task bar.
False
3
When adding rows to character columns, make sure you enclose the values in single quotation marks.
True
4
When you enter a new row into a table or modify an existing row, the values for one or more columns can be unknown or unavailable.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
5
Dropping a table also deletes any data that you entered into the table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
6
To enter a null value into a table, you use a special format of the NULL command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
7
The data type indicates the type of data that a column can contain.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
8
In general, SQL is case-sensitive.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
9
To run SQL commands in Access, you must first create a new query.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
10
In Access, it is common to create a table using SQL.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
11
Microsoft SQL Server 2005 is a DBMS designed for use in client-server applications.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
12
SQL was developed as the data manipulation language for IBM's prototype relational model DBMS, System R.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
13
Unlike Oracle, Access does not support the DECIMAL data type.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
14
This text uses Oracle Database Express Edition as the DBMS in which to create and run SQL commands.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
15
In Oracle, the data type STRING(n) stores a character string n characters long.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
16
In SQL, there are special rules that specify that a particular word must begin in a particular position on the line.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
17
The data type DECIMAL(5,2) represents a number with three places to the left and two places to the right of the decimal.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
18
In Oracle, the date, November 12, 2010 would be stored as '12-NOV-2010'.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
19
To create a table, type the word TABLE followed by the name of the table to be created and then by the names and data types of the columns that will comprise the table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
20
In SQL, you cannot enter an apostrophe into a column whose type is character (CHAR).
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
21
The ____ data type is used to store integers.

A) INTEGER
B) NUMERAL
C) NUMBER
D) INT
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
22
In SQL Server, execute the sp_columns command to list all the columns in a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
23
To view data in a table, use the VIEW command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
24
What is the original name of SQL?

A) SEQUEL
B) MYSEQUEL
C) DBase
D) MySQL
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
25
In Oracle, dates have the form ____.

A) DD-MON-YY
B) MON-DD-YY
C) YYYY-MON-DD
D) DD-MON-YYYY
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
26
If you added a row that should not be in a table, use a REMOVE command to remove it.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
27
In SQL, table names cannot exceed ____ characters.

A) 12
B) 14
C) 24
D) 30
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
28
The DESCRIBE TABLE command defines a table's structure by listing its columns, data types, and column lengths.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
29
In Access, dates have the form ____.

A) DD/MM/YY
B) MM/DD/YYYY
C) YYYY/MON/DD
D) DD/MON/YYYY
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
30
To list all the columns in a table, use the LIST COLUMNS command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
31
SQL was developed in the mid-____.

A) 1960s
B) 1970s
C) 1980s
D) 1990s
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
32
To delete an entire table, use the ____ command and then re-create the table.

A) REMOVE TABLE
B) DELETE TABLE
C) ERASE TABLE
D) DROP TABLE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
33
Which of the following is a valid name for a table?

A) TBL_1
B) 2_TBL
C) TBL 3
D) 4 tbl
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
34
To change a value in a table, use the CHANGE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
35
You indicate the end of a command by typing a ____.

A) column
B) comma
C) semicolon
D) period
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
36
Access does not use script files.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
37
The Oracle Database Express edition allows you to save a command so you can use it again without retyping it.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
38
In Access, use the Documenter tool to describe the tables in a database.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
39
If your screen displays the SQL Commands page, the Home>SQL>SQL Commands reference at the top of the SQL editor pane is called a ____.

A) command sequence
B) page sequence
C) breadcrumb
D) page trail
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
40
Oracle stores script files is a special location called Saved Commands.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
41
You can use the ____________________ data type to store date data.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
42
SQL is Structured ____________________ Language.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
43
In Oracle 10G Express, you enter commands on the SQL ____________________ page.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
44
The ____________________ data type stores integers but uses less space than the INT data type.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
45
Which of the following commands changes the value in a column?

A) UPDATE
B) CHANGE
C) REPLACE
D) ADD
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
46
The data type DECIMAL(5,2) represents a number with ____________________ places to the left and two places to the right of the decimal.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
47
The ____ data type stores only the actual character string.

A) CHAR
B) VARCHAR
C) TEXT
D) STRING
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
48
A ____ file is a text file with a .sql extension that contains SQL commands.

A) command
B) batch
C) sequel
D) script
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
49
Use the ____ data type for columns that contain letters and special characters and for columns containing numbers that will not be used in calculations.

A) CHAR
B) CHARACTER
C) TEXT
D) STRING
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
50
Access does not support the ____ data type.

A) DECIMAL
B) CURRENCY
C) INT
D) NUMBER
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
51
The ____ command defines a table's structure by listing its columns, data types, and column lengths.

A) NEW TABLE
B) DEFINE TABLE
C) CREATE TABLE
D) ADD TABLE
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
52
You use the ____________________ command to describe the layout of a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
53
In Oracle 10 G Express, the results of a SQL command appear in the ____________________ pane.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
54
In Oracle 10 G Express, you enter a command in the SQL editor pane and then click the ____________________ button to execute the command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
55
In this text, SQL commands are illustrated using ____________________.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
56
For any column whose data type is CHAR, values must be enclosed in ____.

A) double quotation marks
B) parentheses
C) single quotation marks
D) square brackets
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
57
The correct data type for the BALANCE column in the CUSTOMER table is ____.

A) CHAR
B) INT
C) SMALLINT
D) DECIMAL
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
58
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.

A) single quote
B) asterisk
C) double quote
D) slash
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
59
You can delete the entire table using the ____________________ TABLE command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
60
When a script file contains more than one command, each command must end with a(n) ____.

A) apostrophe
B) semicolon
C) period
D) colon
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
61
To view the data in a table, you use the ____________________ command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
62
A file containing SQL commands is called a(n) ____________________ file.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
63
You can use a special value to represent situations in which an actual value is unknown, unavailable, or not applicable. This special value is called a(n) ____________________ data value.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
64
You must enclose values in ____________________ quotation marks for any column whose type is character (CHAR), even when the data contains numbers.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
65
How can you correct errors in data?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
66
In Oracle, what is the script repository?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
67
In Oracle, use the ____________________ command to list all columns in a table and their properties.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
68
What are the common restrictions placed on table and column names?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
69
In Access, use the ____________________ tool to describe the tables and other objects in a database.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
70
The ____________________ command adds rows to a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
71
To indicate columns that cannot contain null values, use the ____________________ clause in a CREATE TABLE statement.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
72
If you need to delete a row from a table, you can use the ____________________ command.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
73
Should a user be allowed to enter null values for the primary key?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
74
Why does the ZIP column in the REP table have a data type of CHAR, if a ZIP Code is made up of numbers?
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
75
You can use the ____________________ command to update a value in a table.
Unlock Deck
Unlock for access to all 75 flashcards in this deck.
Unlock Deck
k this deck
locked card icon
Unlock Deck
Unlock for access to all 75 flashcards in this deck.