Basic SQL Select Statements

Ace your homework & exams now with Quizwiz!

A(n) CRBMDS is a software program that can be used to create a relational database and allows you to enter, manipulate, and retrieve data. _________________________

false

Combining the contents of two or more columns is known as projection. _________________________ ​

false

Each clause of a SELECT statement must be entered on a new line in SQL*Plus. _________________________ ​

false

Each section of a SQL command that begins with a keyword is known as a statement.​

false

If a column name is entered in lower case in the SELECT statement, the data for the column will be displayed in lower case in the results.​

false

Insignificant zeros are displayed for numeric columns by default to show two decimal places. _________________________ ​

false

The ALL option can be used in the SELECT clause to indicate that all columns should be retrieved. _________________________

false

The SELECT clause identifies the table containing the data to be queried. _________________________

false

The SELECT command can be used to display the structure of a database table. _________________________ ​

false

​ A double backslash (\\) is used to indicate concatenation in a SELECT statement.

false

The optional keyword ____________________ can be used to distinguish between a column name and a column alias. ​

AS

The ____________________ keyword can be included in a SELECT statement to suppress the display of duplicate data. ​

UNIQUE or DISTINCT

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

concatenation

By default, the data for a numeric column is ____________________ aligned when it is displayed. ​

right

A query is accomplished by issuing a SELECT statement.​

true

____________________ statements can be used to retrieve data from database tables.​

SELECT

SQL*Plus can only be accessed via an internet interface.

false

A column alias must be contained within double quotation marks (" ") if it contains which of the following?​

all of the above

A(n) ____ has a predefined meaning in Oracle 12c. ​

keyword

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

pubid

A clause is a section within a SQL statement that begins with a keyword. ​

true

A query can be executed in the SQL*Plus tool. _________________________ ​

true

Contents of the PUBLISHER table ​ ​ Based upon the contents of the PUBLISHER table, which of the following is a valid SQL statement?

SELECT contact, name FROM publisher;

Contents of the PUBLISHER table ​ ​ Based upon the contents of the PUBLISHER table, which of the following SQL statements will display only two columns in the results?

​ SELECT contact person, name FROM publisher;​

Contents of the BOOKS table ​ Based upon the contents of the BOOKS table, which of the following SQL statements will display the retail price for two copies of each book currently in inventory?

​ SELECT title, retail+retail FROM books;

Contents of the BOOKS table Which of the following is a valid SQL statement?​

​ SELECT title, retail-cost FROM books;

If you do not want a column alias to appear in all upper case characters, the column alias must be enclosed in ____________________ marks. ​

double quotation

A column heading that is longer than the width of a column will not be truncated for a column that is defined to store character data. _________________________

false

A double backslash (\\) is used to indicate concatenation in a SELECT statement.

false

A user can indicate that all columns of a table should be displayed in the results of a SELECT statement by including an asterisk (*) in the SELECT clause.

true

You can include ____________________ to override the order of operations when solving arithmetic expressions. ​

( ) or parentheses

Which of the following symbols represents all the columns contained in a table?​

*

What is the correct answer for the arithmetic expression 9+2*3-2 using the order of operations employed by Oracle 12c when solving equations? ​

13

A ____________________ is used to end a SQL statement.

;

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

FROM

A string literal must be enclosed in double quotation marks. _________________________ ​

false

​ The DESCRIBE command is used to view data in a table.

false

​ The SELECT clause of the SELECT statement is used to identify which rows are to be retrieved from a specified table.

false

Contents of the PUBLISHER table ​ Based upon the contents of the PUBLISHER table, which of the following SELECT statements will display the publisher's name first in the results?

none of the above

Which of the following are case sensitive in Oracle 12c?​

none of the above

Which of the following types of columns will automatically right-align the data when it is displayed?​

numeric

The ____ for a SQL statement gives the basic structure, or rules, required to execute the statement.​

syntax

What is the correct solution for the arithmetic expression (2+8)/2*9/3 using the order of operations employed by Oracle 12c when solving equations?​

15

What is the correct answer for the arithmetic expression 9+2*(3-4) using the order of operations employed by Oracle 12c when solving equations? ​

7

What is used to indicate the end of an SQL statement?​

;

A(n) WHERE statement allows a user to retrieve data from a database table. ​ _________________________

false

The asterisk symbol (*) can be used in a SELECT statement to indicate that all rows in the table should be displayed in the results.​

false

The following arithmetic operations can be performed in the SELECT clause of a SELECT statement: addition (+), subtraction (-), multiplication (*), division (/), and exponential (^).​

false

​ Each section of a statement that begins with a keyword is known as a(n) buffer . _________________________

false

​ If you assign a column alias to a column, it must be enclosed in double quotation marks (" ").

false

​ The DIST or UNIQ keywords can be used to suppress duplicate data in the results of a SELECT statement.

false

​ The columns displayed in the results of a SELECT statement will be in the same order as they are stored in the database table.

false

​ The only required clauses for a SELECT statement are the WHERE and FROM clauses. _________________________

false

Structure of the ORDERS table Based upon the structure of the ORDERS table, the column heading for which column will be truncated in the results?​

shipzip

By default, data within a numeric column is right-aligned when it is displayed. _________________________ ​

true

Choosing specific columns to be displayed by a SELECT statement is known as projection. ​

true

SQL*Plus is an Oracle tool used to enter and edit SQL statements.​

true

The majority of operations performed on a typical database table utilize the SELECT statement.

true

The syntax for a SQL statement gives the basic structure required to execute the statement.

true

When a user asks the database a question, the user is issuing a query.​

true

​ If a column alias contains a blank space, it must be enclosed in double quotation marks. _________________________

true

​ In a(n) SELECT statement, keywords, table names, and column names are not case sensitive. _________________________

true

​ Parentheses can be used to override the order of operations in an arithmetic expression.

true

​ The DISTINCT keyword can be used to indicate that duplicate data should be suppressed in the results of a query. _________________________

true

​ The optional keyword AS can be used to indicate that the subsequent string of characters is a column alias.

true

If a column heading is longer than the assigned width of a character column, the column heading will be ____________________. ​

truncated

Which of the following symbols can be used to combine data from different columns into one column of output?​

||

Contents of the BOOKS table Based upon the contents of the BOOKS table, which of the following SQL statements will display five rows in its results?​

​ SELECT DISTINCT pubid FROM books;

Structure of the ORDERS table Based upon the structure of the ORDERS table, which of the following SQL statements will return an error message upon execution?​

​ SELECT order#, "order number" FROM orders;

Structure of the ORDERS table Based upon the structure of the ORDERS table, which of the following is a valid SQL statement?​

​ SELECT order#, orderdate DateOrdered FROM orders;

Contents of the BOOKS table Which of the following SQL statements will display the profit generated by each book currently stored in the BOOKS table?​

​ SELECT title, retail-cost FROM books;

Which of the following statements is correct?​

​ The columns will be listed in the results in the same order they are listed in the SELECT clause of the SELECT statement.

​ A string literal must be enclosed in ____.

​ single quotation marks (' ')

A(n) ____________________ is included in the SELECT clause to indicate that all columns in the specified table should be listed in the results. ​

*

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? ​

,

What is the correct solution for the arithmetic expression (2+8)/2*9/3 using the order of operations employed by Oracle 12c when solving equations?​

1.336

Structure of the ORDERS table Which of the following statements can be used to view the structure of the ORDERS table?​

DESCRIBE ORDERS

Which of the following keywords can be included in a SELECT statement to suppress duplicate data?​

DISTINCT

Which of the following is a mandatory clause in a SELECT statement?​

FROM

The names of the columns to be retrieved are listed in the ____________________ clause. ​

SELECT

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

SELECT

Contents of the BOOKS table Which of the following is a valid SQL statement?​

SELECT title, retail-cost FROM books;

A(n) ____________________ is an alternative column heading displayed in the output of a query. ​

column alias

By default, the data for character fields are displayed ____________________ aligned when they are displayed. ​

left

When resolving arithmetic expressions, Oracle 12c always performs the operations by starting on the ____________________ side of the expression. ​

left

A string literal must be enclosed in ____________________ marks. ​

single quotation or ' '

A(n) ____________________ can consist of numbers, characters, or special symbols that should be included in the output exactly as entered by the user. ​

string literal

A script file containing SQL statements can be executed from SQL*Plus.

true


Related study sets

AP Macro Unit 1: Basic Economic concepts

View Set

Quizlet # 8. Ir, tener, tomar, y necesitar.

View Set

3.8.W - Lesson: The Digestive System

View Set

NUR 418 Quizzes and PP Questions for Exam 3

View Set