Ch. 2 Flashcards Preview

Oracle 11g SQL > Ch. 2 > Flashcards

Flashcards in Ch. 2 Deck (22):
1

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

Q image thumb

PUBID

2

A(n) ____ has a predefined meaning in Oracle11g

KEYWORD

3

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?

, (COMMA)

4

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

d. Both a and c

5

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

b. AS

6

A string literal must be enclosed in ____.


single quotation marks (' ')
 

7

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

FROM

8

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

SELECT

9

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


concatenation
 

10

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

SELECT *

FROM tablename;

11

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

SELECT columnname

FROM tablename;

 

12

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

SELECT columnname,

columnname,...

FROM tablename;

 

13

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

SELECT coulnmnname AS alias

FROM tablename;

or

SELECT title titles

FROM books;

 

14

What is the command to eliminate duplication in ouput?

SELECT DISTINCT columname

FROM tablename;

or

SELECT UNIQUE columname

FROM tablename;

 

15

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

SELECT columnname || columnname

FROM tablename;

 

16

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

DESCRIBE tablename

17

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

SELECT

18

_______ clause indentify the table containing selected columns.

FROM

19

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

" "

20

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

|| (concatenation)

21

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

' ' (string literal)

22

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

SELECT table_name

FROM user_tables;