You are on page 1of 4

1. A multi-table insert statement can insert into more than one table.

True False

2. A multi-table insert statement must have a subquery at the end of the statement.

True False

3. The MERGE statement first tries to update one or more rows in a table that match the criteria; if no row matches the criteria for the update, a new row will automatically be inserted instead. False 4. If a default value was set for a null column, Oracle sets the column to the default value. However, if no default value was set when the column was created, Oracle inserts an empty space. True or False? False 1. DELETE statements can use correlated subqueries? False 2. If you are performing an UPDATE statement with a subquery, it MUST be a correlated subquery? False 3. To change an existing row in a table, you can use the UPDATE or INSERT statements. False 1. Insert statements can be combined with subqueries to create more than one row per statement. False 2. When inserting a new row, the null keyword can be included in the values list for any column that allows nulls. False 3. When inserting rows into a table, all columns must be given values. False 1. In a correlated subquery, the outer and inner queries are joined on one or more columns. False 2. The WITH clause is a way of creating extra tables in the database. False 3. Correlated Subqueries must reference the same tables in both the inner and outer queries.

True

True

True

True

True

True

True

True

True

True

True

False 4. Table aliases must be used when you are writing correlated subqueries. False 1. In a subquery, the ALL operator compares a value to every value returned by the inner query. True or False? False 2. There can be more than one subquery returning information to the outer query. True or False? False 3. Group functions can be used in subqueries even though they may return many rows. True or False? False 4. Multiple-row subqueries must have NOT, IN, or ANY in the WHERE clause of the inner query. True or False? False 5. Group functions, such as HAVING and GROUP BY, can be used in multiple-row subqueries. True or False? False 1. Subqueries are limited to four per SQL transaction. True or False? False 2. Single row subqueries may not include this operator:

True

True

True

True

True

True

True

<> > ALL

= 3. In a non-correlated subquery, the outer query always executes prior to the inner query's execution. True or False? True False 1. Subqueries can only be placed in the WHERE clause. True or False? True False 1. MINUS will give you rows from the first query that are not present in the second query. True False 2. INTERSECT will give you the common rows found in both queries. True False 1. You can use GROUP functions in all clauses of a SELECT statement. True or False?

False 2. The following statement will work because it uses the same column with different GROUP functions: SELECT AVG(salary), MAX(salary), MIN(salary), SUM(salary) FROM employees; False 1. Hierarchical queries MUST use the LEVEL pseudo column. True or False? False 2. Hierarchical queries can walk both Top-Down and Bottom-Up. True or False? False 1. The following is a valid SQL statement. SELECT e.employee_id, e.last_name, d.location_id, department_id FROM employees e JOIN departments d USING (department_id) ; False 2. Table aliases MUST be used with columns referenced in the JOIN USING clause. True or False? False 1. The join column must be included in the select statement when you use the NATURAL JOIN clause. True or False? False 1. CASE and DECODE evaluate expressions in a similar way to IF-THEN-ELSE logic. However, DECODE is specific to Oracle syntax. True or False? False 1. The following statement returns 0 (zero). True or False? SELECT 121/NULL FROM dual;

True

True

True

True

True

True

True

True

True False

1. The following script will run successfully. True or False? SELECT TO_CHAR(TO_DATE('25-DEC-04','dd-MON-yy')) FROM dual False 2. Which statement is true about SQL functions?

True

a. Functions can convert values or text to another data type. b. Functions can round a number to a specified decimal place. c. Functions can convert upper case characters to lower case characters. a, b and c are true. None of the above statements are true.

1. Round and Trunc cannot be used on Date datatypes. True or False?

True False

1. The answer to the following script is 456. True or False? SELECT TRUNC(ROUND(456.98)) FROM dual;

True False

. Character functions accept character arguments and only return character values. True or False?

True False

You might also like