Ch. 2 Flashcards

1
Q

Based upon the contents of the BOOKS table, which of the following columns will be displayed with a right-aligned column heading?

Contents of the BOOKS table

A

PUBID

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

A(n) ____ has a predefined meaning in Oracle11g

A

KEYWORD

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

If the results of a SELECT statement include more than one column of data, the column names must be separated in the SELECT clause by which of the following symbols?

A

, (COMMA)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Which of the following types of columns will automatically left-align the column heading when it is displayed?

a. Character
b. Numeric
c. Date
d. Both a and c

A

d. Both a and c

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Which of the following keywords can be used to indicate that a column alias should be included in the results?

a. desc
b. AS
c. FROM
d. none of the above

A

b. AS

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

A string literal must be enclosed in ____.

A

single quotation marks (‘ ‘)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

To indicate which database table contains the data to be selected by a query, the table name should be listed in the ____ clause

A

FROM

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Which of the following commands is used to issue a query?

A

SELECT

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Combining the contents of two or more columns is known as ____.

A

concatenation

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

What is the Command to view all the columns of a table?

A

SELECT *

FROM tablename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What is the command to view one column of a table?

A

SELECT columnname

FROM tablename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

What is the command to view multiple columns of a table?

A

SELECT columnname,

columnname,…

FROM tablename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is the command to asign an alias to a column during display?

A

SELECT coulnmnname AS alias

FROM tablename;

or

SELECT title titles

FROM books;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What is the command to eliminate duplication in ouput?

A

SELECT DISTINCT columname

FROM tablename;

or

SELECT UNIQUE columname

FROM tablename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What is the command to perform concatenation of column contents during display?

A

SELECT columnname || columnname

FROM tablename;

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the command to view the structure of a table?

A

DESCRIBE tablename

17
Q

________ clause identify the columns for etrieval in a SELECT command.

A

SELECT

18
Q

_______ clause indentify the table containing selected columns.

A

FROM

19
Q

_____ preserve spaces, symbols, or letter case in an output column alias.

A

” “

20
Q

____ combine display of content from multiple columns into a single column.

A

|| (concatenation)

21
Q

_____ indicate the exact set of characters, including spaces, to be displayed.

A

’ ‘ (string literal)

22
Q

What is the command that lists the name of all tables in the current account?

A

SELECT table_name

FROM user_tables;