Basic SQL Select Statements

25 July 2022
4.7 (114 reviews)
96 test answers

Unlock all answers in this set

Unlock answers (92)
question
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? ​
answer
,
question
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?​
answer
1.336
question
When resolving arithmetic expressions, Oracle 12c always performs the operations by starting on the ____________________ side of the expression. ​
answer
left
question
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?​
answer
pubid
question
A query is accomplished by issuing a SELECT statement.​
answer
true
question
When a user asks the database a question, the user is issuing a query.​
answer
true
question
​ The DISTINCT keyword can be used to indicate that duplicate data should be suppressed in the results of a query. _________________________
answer
true
question
Choosing specific columns to be displayed by a SELECT statement is known as projection. ​
answer
true
question
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?
answer
​ SELECT contact person, name FROM publisher;​
question
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?
answer
none of the above
question
Which of the following symbols represents all the columns contained in a table?​
answer
*
question
A ____________________ is used to end a SQL statement.
answer
;
question
​ The optional keyword AS can be used to indicate that the subsequent string of characters is a column alias.
answer
true
question
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? ​
answer
7
question
The majority of operations performed on a typical database table utilize the SELECT statement.
answer
true
question
A clause is a section within a SQL statement that begins with a keyword. ​
answer
true
question
​ If a column alias contains a blank space, it must be enclosed in double quotation marks. _________________________
answer
true
question
​ Parentheses can be used to override the order of operations in an arithmetic expression.
answer
true
question
Which of the following keywords can be included in a SELECT statement to suppress duplicate data?​
answer
DISTINCT
question
The ALL option can be used in the SELECT clause to indicate that all columns should be retrieved. _________________________
answer
false
question
​ The DESCRIBE command is used to view data in a table.
answer
false
question
A(n) ____________________ is included in the SELECT clause to indicate that all columns in the specified table should be listed in the results. ​
answer
*
question
By default, data within a numeric column is right-aligned when it is displayed. _________________________ ​
answer
true
question
A(n) ____________________ is an alternative column heading displayed in the output of a query. ​
answer
column alias
question
Contents of the BOOKS table Which of the following is a valid SQL statement?​
answer
SELECT title, retail-cost FROM books;
question
Each section of a SQL command that begins with a keyword is known as a statement.​
answer
false
question
Insignificant zeros are displayed for numeric columns by default to show two decimal places. _________________________ ​
answer
false
question
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. _________________________
answer
false
question
Which of the following types of columns will automatically right-align the data when it is displayed?​
answer
numeric
question
Each clause of a SELECT statement must be entered on a new line in SQL*Plus. _________________________ ​
answer
false
question
​ The only required clauses for a SELECT statement are the WHERE and FROM clauses. _________________________
answer
false
question
By default, the data for a numeric column is ____________________ aligned when it is displayed. ​
answer
right
question
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?
answer
​ SELECT title, retail+retail FROM books;
question
Combining the contents of two or more columns is known as ____________________. ​
answer
concatenation
question
The ____ for a SQL statement gives the basic structure, or rules, required to execute the statement.​
answer
syntax
question
Structure of the ORDERS table Which of the following statements can be used to view the structure of the ORDERS table?​
answer
DESCRIBE ORDERS
question
The SELECT clause identifies the table containing the data to be queried. _________________________
answer
false
question
What is used to indicate the end of an SQL statement?​
answer
;
question
The syntax for a SQL statement gives the basic structure required to execute the statement.
answer
true
question
A double backslash () is used to indicate concatenation in a SELECT statement.
answer
false
question
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?​
answer
pubid
question
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?
answer
​ SELECT title, retail+retail FROM books;
question
​ If you assign a column alias to a column, it must be enclosed in double quotation marks (" ").
answer
false
question
Which of the following is a mandatory clause in a SELECT statement?​
answer
FROM
question
Which of the following statements is correct?​
answer
​ The columns will be listed in the results in the same order they are listed in the SELECT clause of the SELECT statement.
question
If a column heading is longer than the assigned width of a character column, the column heading will be ____________________. ​
answer
truncated
question
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?​
answer
​ SELECT title, retail-cost FROM books;
question
The names of the columns to be retrieved are listed in the ____________________ clause. ​
answer
SELECT
question
​ A double backslash () is used to indicate concatenation in a SELECT statement.
answer
false
question
____________________ statements can be used to retrieve data from database tables.​
answer
SELECT
question
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. _________________________
answer
false
question
Combining the contents of two or more columns is known as projection. _________________________ ​
answer
false
question
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.
answer
true
question
By default, the data for character fields are displayed ____________________ aligned when they are displayed. ​
answer
left
question
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?​
answer
15
question
A column alias must be contained within double quotation marks (" ") if it contains which of the following?​
answer
all of the above
question
​ Which of the following commands is used to issue a query?
answer
SELECT
question
SQL*Plus can only be accessed via an internet interface.
answer
false
question
Structure of the ORDERS table Based upon the structure of the ORDERS table, which of the following is a valid SQL statement?​
answer
​ SELECT order#, orderdate DateOrdered FROM orders;
question
​ Each section of a statement that begins with a keyword is known as a(n) buffer . _________________________
answer
false
question
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?​
answer
​ SELECT DISTINCT pubid FROM books;
question
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? ​
answer
13
question
If you do not want a column alias to appear in all upper case characters, the column alias must be enclosed in ____________________ marks. ​
answer
double quotation
question
The following arithmetic operations can be performed in the SELECT clause of a SELECT statement: addition (+), subtraction (-), multiplication (*), division (/), and exponential (^).​
answer
false
question
By default, data within a numeric column is right-aligned when it is displayed. _________________________ ​
answer
true
question
The asterisk symbol (*) can be used in a SELECT statement to indicate that all rows in the table should be displayed in the results.​
answer
false
question
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?​
answer
shipzip
question
By default, the data for a numeric column is ____________________ aligned when it is displayed. ​
answer
right
question
Contents of the BOOKS table Which of the following is a valid SQL statement?​
answer
​ SELECT title, retail-cost FROM books;
question
Which of the following are case sensitive in Oracle 12c?​
answer
none of the above
question
The SELECT command can be used to display the structure of a database table. _________________________ ​
answer
false
question
A string literal must be enclosed in double quotation marks. _________________________ ​
answer
false
question
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?​
answer
​ SELECT title, retail-cost FROM books;
question
Contents of the BOOKS table Which of the following is a valid SQL statement?​
answer
​ SELECT title, retail-cost FROM books;
question
​ A string literal must be enclosed in ____.
answer
​ single quotation marks (' ')
question
A query can be executed in the SQL*Plus tool. _________________________ ​
answer
true
question
​ The DIST or UNIQ keywords can be used to suppress duplicate data in the results of a SELECT statement.
answer
false
question
A(n) ____________________ can consist of numbers, characters, or special symbols that should be included in the output exactly as entered by the user. ​
answer
string literal
question
​ In a(n) SELECT statement, keywords, table names, and column names are not case sensitive. _________________________
answer
true
question
​ The SELECT clause of the SELECT statement is used to identify which rows are to be retrieved from a specified table.
answer
false
question
The ____________________ keyword can be included in a SELECT statement to suppress the display of duplicate data. ​
answer
UNIQUE or DISTINCT
question
To indicate which database table contains the data to be selected by a query, the table name should be listed in the ____ clause.​
answer
FROM
question
The optional keyword ____________________ can be used to distinguish between a column name and a column alias. ​
answer
AS
question
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?​
answer
shipzip
question
A(n) WHERE statement allows a user to retrieve data from a database table. ​ _________________________
answer
false
question
​ The columns displayed in the results of a SELECT statement will be in the same order as they are stored in the database table.
answer
false
question
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.​
answer
false
question
Contents of the PUBLISHER table ​ ​ Based upon the contents of the PUBLISHER table, which of the following is a valid SQL statement?
answer
SELECT contact, name FROM publisher;
question
A(n) ____ has a predefined meaning in Oracle 12c. ​
answer
keyword
question
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?​
answer
​ SELECT order#, "order number" FROM orders;
question
A string literal must be enclosed in ____________________ marks. ​
answer
single quotation or ' '
question
You can include ____________________ to override the order of operations when solving arithmetic expressions. ​
answer
( ) or parentheses
question
A script file containing SQL statements can be executed from SQL*Plus.
answer
true
question
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?
answer
​ SELECT title, retail+retail FROM books;
question
Which of the following symbols can be used to combine data from different columns into one column of output?​
answer
||
question
SQL*Plus is an Oracle tool used to enter and edit SQL statements.​
answer
true