Database Flashcards
The WITH clause can be used to name a subquery. Which of the following is also true?
- The name of the subquery can be used in the SELECT statement following the WITH clause.
- The name of the subquery can be joined to other tables in the SELECT statement following the WITH clause.
Which three statements are true about multiple row subqueries?
- They can return multiple columns.
- They can contain GROUP BY clauses.
=Two or more values are always returned from the subquery.
Which two are true about savepoints?
=After issuing a savepoints, you can roll back to the savepoint name within the current transaction.
=You can commit updates done between two savepoints without committing other updates in the current transaction.
Which statement is true regarding external tables?
The CREATE TABLE AS SELECT statement can be used to upload data into a normal table in the database from an external table
Which statement is true regarding external tables?
The CREATE TABLE AS SELECT statement can be used to upload data into a normal table in the database from an external table
Built-in SQL functions:
Choose three.
Are available for use within a SELECT statement’s WHERE clause, as well as the SELECT statement’s expression list.
Can be invoked from a DELETE statement’s WHERE clause.
Are available for use from the UPDATE statement.
An invisible index is an index on one or more columns in a table:
And is updated for any DELETE statements performed on the table
Which three statements are true about GLOBAL TEMPORARY TABLES?
Data Manipulation Language (DML) on GLOBAL TEMPORARY TABLES generates no REDO.
A trigger can be created on a GLOBAL TEMPORARY TABLE.
A GLOBAL TEMPORARY TABLE can be referenced in the defining query of a view.
Which three statements are true about single-row functions?
The argument can be a column name, variable, literal or an expression
They can be nested to any level
The data type returned can be different from the data type of the argument
Which statement is true regarding the default behavior of the ORDER BY clause?
Numeric values are displayed from the maximum to the minimum value if they have decimal positions.
Which two are true about granting privileges on objects?
A table owner must grant the REFERENCES privilege to allow other users to create FOREIGN KEY constraints using that table.
The owner of an object acquires all object privileges on that object by default.
Which two statements are true regarding views?
Rows cannot be deleted through a view if the view definition contains the DISTINCT keyword.
The OR REPLACE option is used to change the definition of an existing view without dropping and re-creating it.
The purpose of NULLIF is to:
None of the above
What can an INSERT statement do?
Add data into more than one column in a table
Add rows into more than one table
Which of the following can a subquery be used in?
A WHERE clause in a SELECT statement
An INSERT statement’s SELECT
An inline view
To list all the currently defined variables, use:
DEFINE
What can be granted to a role?
System privileges
Object privileges
A role:
Can be created by a user only if that user has the CREATE ROLE system privilege
Which two are true about scalar subquery expressions?
They can return at most one row.
You must enclose them in parentheses.
A self-join is:
A SELECT statement that joins a table to itself by connecting a column in the table to a different column in the same table
A SELECT statement that specifies one table twice in the FROM clause
A multitable INSERT statement:
Can use conditional logic