Docsity

Basic SQL Select Statements revision test questions, Exams of Advanced Education

Toggle sidebar
bg1
1 / 10
Basic SQL Select Statements revision test
questions
1. 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? : ,
2. 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
3. When resolving
arithmetic expressions, Oracle 12c always performs the operations by
starting on the side of the expression. :
left
4. 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
5. A query is accomplished by issuing a SELECT statement.: true
6. When a user asks the database a question, the user is issuing a
query.: true
7.The DISTINCT keyword can be used to indicate that duplicate data
should be suppressed in the results of a query. : true
8. Choosing specific columns to be displayed by a SELECT statement is
known as projection. : true
9. Contents of the PUBLISHER table
Based upon the contents of the PUBLISHER table, which of the
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Basic SQL Select Statements revision test questions and more Exams Advanced Education in PDF only on Docsity!

Basic SQL Select Statements revision test

questions

  1. 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? : ,
  2. 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.
  3. When resolving arithmetic expressions, Oracle 12c always performs the operations by starting on the side of the expression. : left
  4. 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
  5. A query is accomplished by issuing a SELECT statement.: true
  6. When a user asks the database a question, the user is issuing a query.: true 7.The DISTINCT keyword can be used to indicate that duplicate data should be suppressed in the results of a query. : true
  7. Choosing specific columns to be displayed by a SELECT statement is known as projection. : true
  8. 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;

  1. Contents of the PUBLISHER table

books;

  1. Each section of a SQL command that begins with a keyword is known as a statement.: false
  2. Insignificant zeros are displayed for numeric columns by default to show two decimal places. : false
  3. A(n) CRBMDS is a software program that can be used to create a re-lational database and allows you to enter, manipulate, and retrieve data. : false
  4. Which of the following types of columns will automatically right-align the data when it is displayed?: numeric
  5. Each clause of a SELECT statement must be entered on a new line in SQL*Plus. : false
  6. The only required clauses for a SELECT statement are the WHERE and FROM clauses. : false
  7. By default, the data for a numeric column is aligned when it is displayed. : right
  8. 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;
  9. Combining the contents of two or more columns is known as . : concatenation
  10. The for a SQL statement gives the basic structure, or rules, required to execute the statement.: syntax
  11. Structure of the ORDERS table Which of the following statements can be used to view the structure of the ORDERS table?: DESCRIBE ORDERS
  12. The SELECT clause identifies the table containing the data to be queried.

: false

  1. What is used to indicate the end of an SQL statement?: ;
  2. The syntax for a SQL statement gives the basic structure required to exe-cute the statement.: true
  3. A double backslash (\) is used to indicate concatenation in a SELECT state-ment.: false
  4. If you assign a column alias to a column, it must be enclosed in double quotation marks (" ").: false
  5. Which of the following is a mandatory clause in a SELECT statement?: FROM
  6. 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.
  7. If a column heading is longer than the assigned width of a character column, the column heading will be. : truncated
  8. 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;
  9. The names of the columns to be retrieved are listed in the clause. : SELECT
  10. A double backslash (\) is used to indicate concatenation in a SELECT statement.: false
  11. statements can be used to retrieve data from database tables.: SELECT
  12. 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
  13. Combining the contents of two or more columns is known as projection. : false
  1. The following arithmetic operations can be performed in the SELECT clause of a SELECT statement: addition (+), subtraction (-), multiplication (*), division (/), and exponential (^).: false
  2. 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
  3. 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
  4. Contents of the BOOKS table Which of the following is a valid SQL statement?: SELECT title, retail-cost FROM books;
  5. Which of the following are case sensitive in Oracle 12c?: none of the above
  6. The SELECT command can be used to display the structure of a database table. : false
  7. A string literal must be enclosed in double quotation marks. : false
  8. A string literal must be enclosed in .: single quotation marks (' ')
  9. A query can be executed in the SQL*Plus tool. : true
  10. The DIST or UNIQ keywords can be used to suppress duplicate data in the results of a SELECT statement.: false
  11. A(n) can consist of numbers, characters, or special sym-bols that should be included in the output exactly as entered by the user. : string literal
  12. In a(n) SELECT statement, keywords, table names, and column names are not case sensitive. :

true

  1. The SELECT clause of the SELECT statement is used to identify which rows are to be retrieved from a specified table.: false
  2. The keyword can be included in a SELECT statement to suppress the display of duplicate data. : UNIQUE or DISTINCT
  3. To indicate which database table contains the data to be selected by a query, the table name should be listed in the clause.: FROM
  4. The optional keyword can be used to distinguish be-tween a column name and a column alias. : AS
  5. A(n) WHERE statement allows a user to retrieve data from a database table. : false
  6. 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
  7. 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
  8. 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;
  9. A(n) has a predefined meaning in Oracle 12c. : keyword
  10. 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;
  1. You can include to override the order of operations when solving arithmetic expressions. : ( ) or parentheses
  2. A script file containing SQL statements can be executed from SQL*Plus.: true
  3. Which of the following symbols can be used to combine data from different columns into one column of output?: ||
  4. SQL*Plus is an Oracle tool used to enter and edit SQL statements.: true