The CUSTOMERS table has a CUST_LAST_NAME column of data type VARCHAR2. The table has two rows whose COST_LAST_MANE values are Anderson and Ausson. Which query produces output for CUST_LAST_SAME containing Oder for the first row and Aus for the second?
-
A
SELECT REPLACE (REPLACE(cust_last_name,'son',''),'An','O') FROM customers;
-
B
SELECT REPLACE (TRIM(TRALING'son' FROM cust_last_name),'An','O') FROM customers;
-
C
SELECT INITCAP (REPLACE(TRIM('son' FROM cust_last_name),'An','O')) FROM customers;
-
D
SELECT REPLACE (SUBSTR(cust_last_name,-3),'An','O') FROM customers;
Reveal answer details
Close answer details
Question 2
Multiple choice
View the Exhibit and examine the structure of the ORDERS table. The columns ORDER_MODE and ORDER_TOTAL have the default values `direct' and 0 respectively.  Which two INSERT statements are valid? (Choose two.)
-
A
INSERT INTO orders VALUES (1,'09-mar-2007', `online','', 1000);
-
B
INSERT INTO orders (order_id,order_date,order_mode, (customer_id,order_total) VALUES (1,TO_DATE(NULL), `online', 101, NULL);
-
C
INSERT INTO (SELECT order_id,order_date,customer_id FROM orders) VALUES (1,'09-mar-2007', 101);
-
D
INSERT INTO orders VALUES (1,'09-mar-2007', DEFAULT, 101, DEFAULT);
-
E
INSERT INTO orders (order_id,order_date,order_mode,order_total) VALUES (1,'10-mar-2007',`online',1000);
Reveal answer details
Close answer details
Question 3
Multiple choice
Which three statements are true about views in an Oracle database?
-
A
The WITH CHECK clause prevents certain rows from being displayed when querying the view.
-
B
The WITH CHECK clause prevents certain rows from being updated or inserted.
-
C
Tables in the defining query of a view must always exist in order to create the view.
-
D
Date Manipulation Language (DML) can always be used on views.
-
E
Deleting one or more rows using a view whose defining query contains a GROUP BY clause will cause an error.
-
F
Views can be updated without the need to re-grant privileges on the view.
-
G
Inserting one or more rows using a view whose defining query contains a GROUP BY clause will cause an error.
Reveal answer details
Close answer details
Which set of commands will prompt only once for the name of the table to use in the query?
-
A
PROMPT Enter table name &x - SELECT employee_id FROM &x WHERE last_name = `King';
-
B
DEFINE x = `employees' PROMPT Enter table name &x - SELECT employee_id FROM &x WHERE last_name = `King';
-
C
PROMPT Enter table name &x - SELECT employee_id FROM &&x WHERE last_name = `King';
-
D
PROMPT Enter table name &&x - SELECT employee_id FROM &x WHERE last_name = `King';
Reveal answer details
Close answer details
Question 5
Multiple choice
Examine the description of EMPLOYEES table:  Which three queries return all rows for which SALARY + COMMISSION is greater than 20000? (Choose three.)
-
A
SELECT * FROM employees WHERE NVL2(salary + commission, salary + commission, salary) >= 20000;
-
B
SELECT * FROM employees WHERE salary + NVL2(commission, commission, 0) >= 20000
-
C
SELECT * FROM employees WHERE NVL(salary + commission, 0) >= 20000;
-
D
SELECT * FROM employees WHERE salary + NULLIF(commission, 0) >= 20000;
-
E
SELECT * FROM employees WHERE COALESCE(salary, commission) >= 20000;
-
F
SELECT * FROM employees WHERE salary + NVL(commission, 0) >= 20000;
Reveal answer details
Close answer details
Question 6
Multiple choice
The ORDERS table has a column ORDER_DATE of data type DATE. The default display format for a date is DD-MON-RR. Which two WHERE conditions demonstrate the correct usage of conversion functions? (Choose two.)
-
A
WHERE order_date > TO_DATE(`JUL 10 2018', ` MON DD YYYY')
-
B
WHERE order_date > TO_DATE(ADD_MONTH(SYSDATE, 6), `MON DD YYYY')
-
C
WHERE order_date IN (TO_DATE(`Oct 21 2018', `Mon DD YYYY'), TO_CHAR(`Nov 21 2018', `Mon DD YYYY'))
-
D
WHERE order_date > TO_CHAR(ADD_MONTHS(SYSDATE, 6), `MON DD YYYY')
-
E
WHERE TO_CHAR(order_date. `MON DD YYYY') = `JAN 20 2019'
Reveal answer details
Close answer details
Question 7
Multiple choice
You need to calculate the number of days from 1st January 2019 until today. Dates are stored in the default format of DD-MON-RR. Which two queries give the required output? (Choose two.)
-
A
SELECT TO_CHAR(SYSDATE, 'DD-MON-YYYY') - '01-JAN-2019' FROM
-
B
SELECT ROUND(SYSDATE - '01-JAN-2019') FROM DUAL;
-
C
SELECT ROUND(SYSDATE ?TO_DATE('01/JANUARY/2019')) FROM DUAL;
-
D
SELECT TO_DATE(SYSDATE, 'DD/MONTH/YYYY') - '01/JANUARY/2019' FROM DUAL;
-
E
SELECT SYSDATE - TO_DATE('01-JANUARY-2019') FROM DUAL;
Reveal answer details
Close answer details
Examine this query: SELECT SUBSTR (SYSDATE,1,5) `Result' FROM DUAL Which statement is true?
-
A
It fails unless the expression is modified to TO-CHAR(SUNBSTR(SYSDATE,1,5)
-
B
It fails unless the expression is modified to SUBSTR (TO_CHAR(SYSDATE),1,5)
-
C
It fails unless the expression is modified to SUBSTR (TO_CHAR(TRUNC(SYSDATE)),1,5)
-
D
It executes successfully with an implicit data type conversion
Reveal answer details
Close answer details
You must find the number of employees whose salary is lower than employee 110. Which statement fails to do this? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 10
Single choice
The PROD_ID column is the foreign key in the SALES table.Which references the PRODUCTS table. Similarly,the CUST_ID and TIME_ID columns are Also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively. Evaluate the following CREATE TABLE command: CREATE TABLE new_sales(prod_id, I cust_id, order_date DEFAULT SYSDATE) AS SELECT I prod_id,cust_id,time_id FROM sales. Which statement is true regarding the above command?
-
A
The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
-
B
The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified columns would be passed to the new table.
-
C
The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause I do not match.
-
D
The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the specified columns would be passed to the new table
Reveal answer details
Close answer details
Question 11
Single choice
You need to display the date 11-oct-2007 in words as `Eleventh of October, Two Thousand Seven'. Which SQL statement would give the required result?
-
A
SELECT TO_CHAR (TO_DATE ('11-oct-2007'), `fmDdthsp "of" Month, Year') FROM DUAL
-
B
SELECT TO_CHAR (`11-oct-2007', `fmDdspth "of" Month, Year') FROM DUAL
-
C
SELECT TO_CHAR (TO_DATE (`11-oct-2007'), `fmDdspth of month, year') FROM DUAL
-
D
SELECT TO_DATE (TO_CHAR ('11-oct-2007'), `fmDdspth "of" Month, Year')) FROM DUAL
Reveal answer details
Close answer details
Question 12
Multiple choice
Which two statements are true about Oracle synonyms? (Choose two.)
-
A
Users must have the required privileges on the underlying objects to use public synonyms.
-
B
Synonyms can be created for roles.
-
C
Synonyms cannot be created for sequences.
-
D
Synonyms cannot be created for synonyms.
-
E
Synonyms can be created for packages.
-
F
Users must have the DBA role to create public synonyms.
Reveal answer details
Close answer details
Question 13
Multiple choice
Which three are true about scalar subquery expressions?
-
A
A scalar subquery expression that returns zero rows evaluates to zoro
-
B
They cannot be used in the values clause of an insert statement*
-
C
-
D
A scalar subquery expression that returns zero rows evaluates to null.
-
E
They cannot be used in group by clauses.
-
F
They can be used as default values for columns in a create table statement.
Reveal answer details
Close answer details
Correct answersC, D, E
ExplanationReferences: https://docs oracle com/cd/B12037 _01/server.101/b10759/expressions010.htm
Question 14
Multiple choice
Which two statements are true regarding non-equijoins? (Choose two.)
-
A
Table aliases must be used.
-
B
The SQL:1999 compliant ANSI join syntax must be used.
-
C
The USING clause can be used.
-
D
The Oracle join syntax can be used.
-
E
The ON clause can be used.
Reveal answer details
Close answer details
Question 15
Multiple choice
Which two statements are true about the SET VERIFY ON command?
-
A
It displays values for variables created by the DEFINE command.
-
B
It can be used in SQL Developer and SQL*Plus.
-
C
It can be used only in SQL*plus.
-
D
It displays values for variables prefixed with &&.
-
E
It displays values for variables used only in the WHERE clause of a query.
Reveal answer details
Close answer details
Question 16
Multiple choice
Examine the description of the CUSTONERS table:  CUSTNO is the PRIMARY KEY. You must determine if any customers' details have been entered more than once using a different CUSTNO, by listing all duplicate names. Which two methods can you use to get the required result?
-
A
LEFT OUTER JOIN with self join
-
B
PULL OUTER JOIN with self join
-
C
-
D
RIGHT OUTER JOIN with self join
-
E
Reveal answer details
Close answer details
Question 17
Multiple choice
Examine the description of the EMPLOYEES table:  Which two queries will execute successfully? (Choose two.)
-
A
SELECT dept_id, AVG(MAX(salary)) FROM employees GROUP BY dept_id HAVING hire_date > '01- JAN-19';
-
B
SELECT dept_id, SUM(salary) FROM employees WHERE hire_date > '01-JAN-19' GROUP BY dept_id;
-
C
SELECT dept_id, MAX(SUM(salary)) FROM employees GROUP BY dept_id;
-
D
SELECT dept_id, AVG(MAX(salary)) FROM employees GROUP BY dept_id, salary;
-
E
SELECT AVG(MAX(salary)) FROM employees GROUP BY salary;
Reveal answer details
Close answer details
Question 18
Single choice
View the Exhibit and examine the structure of the ORDER_ITEMS table.  Examine the following SQL statement: SELECT order_id, product_id, unit_price FROM order_items WHERE unit_price = (SELECT MAX(unit_price) FROM order_items GROUP BY order_id); You want to display the PRODUCT_ID of the product that has the highest UNIT_PRICE per ORDER_ID. What correction should be made in the above SQL statement to achieve this?
-
A
Remove the GROUP BY clause from the subquery and place it in the main query
-
B
Replace = with the >ANY operator
-
C
Replace = with the >ALL operator
-
D
Replace = with the IN operator
Reveal answer details
Close answer details
Question 19
Multiple choice
Which two are true about multitable INSERT statements?
-
A
The conditional INSERT FIRST statement always inserts a row into a single table.
-
B
The unconditional INSERT ALL statement must have the same number of columns in both the source and target tables.
-
C
They can transform a row from a source table into multiple rows in a target table.
-
D
The conditional INSERT ALL statement inserts rows into a singe table by aggregating source rows.
-
E
They always use subqueries.
Reveal answer details
Close answer details
Question 20
Multiple choice
Which two statements are true about INTERVAL data types?
-
A
INTERVAL YEAR TO MONTH columns only support monthly intervals within a single year.
-
B
INTERVAL DAY TO SECOND columns support fractions of seconds.
-
C
INTERVAL YEAR TO MONTH columns support yearly intervals.
-
D
The YEAR field in an INTERVAL YEAR TO MONTH column must be a positive value.
-
E
INTERVAL YEAR TO MONTH columns only support monthly intervals within a range of years.
-
F
The value in an INTERVAL DAY TO SECOND column can be copied into an INTERVAL YEAR TO MONTH column.
Reveal answer details
Close answer details
Question 21
Multiple choice
Which two statements are true about sequences created in a single instance Oracle database? (Choose two.)
-
A
When the MAXVALUE limit for a sequence is reached, it can be increased by using the ALTER SEQUENCE statement.
-
B
DELETE <sequencename> would remove a sequence from the database.
-
C
The numbers generated by an explicitly defined sequence can only be used to insert data in one table.
-
D
CURRVAL is used to refer to the most recent sequence number that has been generated for a particular sequence.
-
E
When a database instance shuts down abnormally, sequence numbers that have been cached but not used are available again when the instance is restarted.
Reveal answer details
Close answer details
Correct answersA, D
ExplanationReferences: http://docs.oracle.com/cd/E11882_01/server.112/e41084/statements_2012.htm#SQLRF00817 https://docs.oracle.com/cd/A84870_01/doc/server.816/a76989/ch26.htm
Question 22
Multiple choice
Which two statements are true about a self join?
-
A
It can be a left outer join.
-
B
-
C
It must be a full outer join.
-
D
The join key column must have an index.
-
E
Reveal answer details
Close answer details
Question 23
Single choice
Which normal form is a table in if it has no multi-valued attributes and no partial dependencies?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Correct answerA
ExplanationReferences: https://blog.udemy.com/database-normal-forms/
Question 24
Multiple choice
Which three are true about multitable INSERT statements? (Choose three.)
-
A
They can insert each computed row into more than one table.
-
B
They can be performed on remote tables.
-
C
They can be performed on external tables using SQL*Loader.
-
D
They can be performed on views.
-
E
They can be performed only by using a subquery.
-
F
They can be performed on relational tables.
Reveal answer details
Close answer details
Question 25
Multiple choice
Examine this SQL statement:  Which two are true? (Choose two.)
-
A
The DELETE statement executes successfully even if the subquery selects multiple rows.
-
B
The subquery is executed before the DELETE statement is executed.
-
C
The subquery is not a correlated subquery.
-
D
All existing rows in the EMPLOYEES table are deleted.
-
E
The subquery is executed for every row in the EMPLOYEES table.
Reveal answer details
Close answer details
Question 26
Multiple choice
Which two are true? (Choose two.)
-
A
CONCAT joins two character strings together.
-
B
CONCAT joins two or more character strings together.
-
C
FLOOR returns the largest positive integer less than or equal to a specified number.
-
D
INSTR finds the offset within a character string, starting from position 0.
-
E
INSTR finds the offset within a string of a single character only.
-
F
FLOOR returns the largest integer less than or equal to a specified number.
Reveal answer details
Close answer details
Question 27
Multiple choice
Which two are true about granting privileges on objects? (Choose two.)
-
A
An object privilege can be granted to other users only by the owner of that object.
-
B
The owner of an object acquires all object privileges on that object by default.
-
C
The WITH GRANT OPTION clause can be used only by DBA users.
-
D
An object privilege can be granted to a role only by the owner of that object.
-
E
A table owner must grant the REFERENCES privilege to allow other users to create FOREIGN KEY constraints using that table.
Reveal answer details
Close answer details
Question 28
Multiple choice
Which two are true about transactions in the Oracle Database? (Choose two.)
-
A
DML statements always start new transactions.
-
B
DDL statements automatically commit only data dictionary updates caused by executing the DDL.
-
C
A session can see uncommitted updates made by the same user in a different session.
-
D
A DDL statement issued by a session with an uncommitted transaction automatically commits that transaction.
-
E
An uncommitted transaction is automatically committed when the user exits SQL*Plus.
Reveal answer details
Close answer details
Question 29
Single choice
View the Exhibits and examine the structure of the COSTS and PROMOTIONS tables. You want to display PROD IDS whose promotion cost is less than the highest cost PROD ID in a pro motion time interval. Examine this SQL statement:  Exhibit 1.  Exhibit 2.  What will be the result?
-
A
It executes successfully but does not give the required result.
-
B
It gives an error because the ALL keyword is not valid.
-
C
It gives an error because the GROUP BY clause is not valid
-
D
It executes successfully and gives the required result.
Reveal answer details
Close answer details
Question 30
Single choice
Examine the structure of the BOOKS_TRANSACTIONS table:  You want to display the member IDs, due date, and late fee as $2 for all transactions. Which SQL statement must you execute?
-
A
SELECT member_id AS MEMBER_ID, due_date AS DUE_DATE, $2 AS LATE_FEE FROM BOOKS_TRANSACTIONS;
-
B
SELECT member_id 'MEMBER ID', due_date 'DUE DATE', '$2 AS LATE FEE' FROM BOOKS_TRANSACTIONS;
-
C
SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", '$2' AS "LATE FEE" FROM BOOKS_TRANSACTIONS;
-
D
SELECT member_id AS "MEMBER ID", due_date AS "DUE DATE", $2 AS "LATE FEE" FROM BOOKS_TRANSACTIONS;
Reveal answer details
Close answer details
Question 31
Multiple choice
Which three actions can you perform on an existing table containing date?
-
A
Add a new column as the table's first column.
-
B
Define a default value that is automatically inserted into a column containing nulls.
-
C
Add a new NOT NULL Column with a DEFAULT value.
-
D
Change a DATE Column containing data to a NUMBER data type.
-
E
Increase the width of a numeric column.
-
F
Change the default value of a column.
Reveal answer details
Close answer details
Question 32
Multiple choice
Which two statements are true regarding the SQL GROUP BY clause?
-
A
You can use a column alias in the GROUP BY clause.
-
B
Using the WHERE clause after the GROUP BY clause excludes rows after creating groups.
-
C
The GROUP BY clause is mandatory if you are using an aggregating function in the SELECT clause.
-
D
Using the WHERE clause before the GROUP BY clause excludes rows before creating groups.
-
E
If the SELECT clause has an aggregating function, then columns without an aggregating function in the SELECT clause should be included in the GROUP BY clause.
Reveal answer details
Close answer details
Question 33
Single choice
Examine this schema information: 1. EMPLOYEES.DEPARTMENT_ID has a foreign key referencing DEPARTMENTS.DEPARTMENT_ID. 2. EMP_VIEW is based on the EMPLOYEES and DEPARTMENTS tables. 3. EMP_VIEW has columns EMPLOYEE_ID, EMPLOYEE_NAME and DEPARTMENT_NAME. You must add a new column, MANAGER_ID, from the EMPLOYEES table, to the view, showing each employee's manager. Which statement will do this?
-
A
ALTER VIEW emp_view ADD (employee.manager_id);
-
B
ALTER VIEW emp_view MODIFY ( SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d - WHERE e.department_id = d.department_id);
-
C
ALTER VIEW emp_view ADD (SELECT manager_id FROM employees);
-
D
CREATE OR REPLACE VIEW emp_view AS SELECT employee_id, employee_name, department_name, manager_id FROM employees e, departments d - WHERE e.department_id = d.department_id;
Reveal answer details
Close answer details
Question 34
Single choice
Examine these two queries and their output SELECT deptno, dnair.e FROM dept;  SELECT emetine, job, deptno FROM emp ORDER 3Y deptno:  Now examine this query:  How many rows will be displayed?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 35
Single choice
View the exhibit and examine the structure of the SALES, CUSTOMERS, PRODUCTS and TIMES tables.  The PROD_ID column is the foreign key in the SALES table, Which references the PRODUCTS table. Similarly, the CUST_ID and TIME_ID columns are also foreign keys in the SALES table referencing the CUSTOMERS and TIMES tables, respectively. Evaluate the following CREATE TABLE command: CREATE TABLE new_sales (prod_id, cust_id, order_date DEFAULT SYSDATE) AS SELECT prod_id, cust_id, time_id FROM sales; Which statement is true regarding the above command?
-
A
The NEW_SALES table would get created and all the NOT NULL constraints defined on the specified columns would be passed to the new table.
-
B
The NEW_SALES table would not get created because the DEFAULT value cannot be specified in the column definition.
-
C
The NEW_SALES table would not get created because the column names in the CREATE TABLE command and the SELECT clause do not match.
-
D
The NEW_SALES table would get created and all the FOREIGN KEY constraints defined on the specified columns would be passed to the new table.
Reveal answer details
Close answer details
Question 36
Single choice
Examine the data in the PRODUCTS table:  Examine these queries:  Which queries generate the same output?
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 37
Multiple choice
Which two are true about rollbacks?
-
A
The ROLLBACK statement does not release locks resulting from table updates.
-
B
Data Control L anguage (DCL) statements, such as GRANT and REVOKE, can be rolled back.
-
C
A transaction interrupted by a system failure is automatically rolled back.
-
D
If the ROLLBACK statement is used without TO SAVEPOINT, then all savepoints in the transaction are deleted .
-
E
Data consistency is not guaranteed after a rollback.
Reveal answer details
Close answer details
Question 38
Single choice
Examine the description of the EMPLOYEES table:  Examine these requirements: 1. Display the manager id and salary of the lowest paid employee for that manager. 2. Exclude anyone whose manager is not known. 3. Exclude any managers where the minimum salary is 6000 or less. 4. Sort the output by minimum salary with the highest salary shown first. Which statement will do this? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 39
Multiple choice
Which two queries return the string Hello! We're ready? (Choose two.)
-
A
SELECT "Hello! We're ready" FROM DUAL;
-
B
SELECT 'Hello! We're ready' FROM DUAL;
-
C
SELECT q'!Hello! We're ready!' FROM DUAL;
-
D
SELECT q'[Hello! We're ready]' FROM DUAL;
-
E
SELECT 'Hello! We\'re ready' ESCAPE '\' FROM DUAL;
Reveal answer details
Close answer details
Question 40
Multiple choice
Evaluate these commands. Which execute successfully  Which two statements are true about the ORD_ITEMS table and the ORD_SEQ sequence? (Choose two.)
-
A
Sequence ORD_SEQ is guaranteed not to generate duplicate numbers.
-
B
Sequence ORD_SEQ cycles back to 1 after every 5000 numbers and can cycle 20 times.explicit value is given for ORD_NO.
-
C
Column ORD_NO gets the next number from sequence and ORD_SEQ whenever a row is inserted into ORD_ITEMS and no explicit value is given for ORD_NO.
-
D
If sequence ORD_SEQ is dropped then the default value for column ORD_NO will be NULL for rows inserted into ORD_ITEMS.
-
E
Any user inserting rows into table ORD_ITEMS must have been granted access to sequence ORD_SEQ.
Reveal answer details
Close answer details
Question 41
Single choice
Which statement is true about SQL query processing in an Oracle database instance? (Choose the best answer.)
-
A
During parsing, a SQL statement containing literals in the WHERE clause that has been executed by any session and Which is cached in memory, is always reused for the current execution.
-
B
During execution, the Oracle server may read data from storage if the required data is not already in memory.
-
C
During row source generation, rows that satisfy the query are retrieved from the database and stored in memory.
-
D
During optimization, execution plans are formulated based on the statistics gathered by the database instance, and the lowest cost plan is selected for execution.
Reveal answer details
Close answer details
Question 42
Single choice
Examine this statement which executes successfully:  Which statement will violate the CHECK constraint? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 43
Multiple choice
Examine this command: TRUNCATE TABLE test; Table truncated. Which two are true? (Choose two.)
-
A
The structure of the TEST table is removed.
-
B
All the indexes on the TEST table are dropped.
-
C
All the constraints on the TEST table are dropped.
-
D
Removed rows can not be recovered using the ROLLBACK command.
-
E
All the rows in the TEST table are removed.
Reveal answer details
Close answer details
Question 44
Multiple choice
Examine this incomplete query: SELECT DATE '2019-01-01' + <INTERVAL CLAUSE> FROM DUAL; Which three clauses can replace <INTERVAL CLAUSE> to add 12 hours to the date? (Choose three.)
-
A
-
B
-
C
INTERVAL '11:60' HOUR TO MINUTE
-
D
INTERVAL '12:00' HOUR TO SECOND
-
E
INTERVAL '0 12' DAY TO HOUR
-
F
Reveal answer details
Close answer details
Question 45
Multiple choice
Which three statements are true about GLOBAL TEMPORARY TABLES?
-
A
GLOBAL TEMPORARY TABLE rows inserted by a session are available to any other session whose user has been granted select on the table.
-
B
A TRUNCATE command issued in a session causes all rows In a GLOBAL TEMPORARY TABLE for the issuing session to be deleted.
-
C
A DELETE command on a GLOBAL TEMPORARY TABLE cannot be rolled back.
-
D
A GLOBAL TEMPORARY TABLE's definition is available to multiple sessions.
-
E
Any GLOBAL TEMPORARY TABLE rows existing at session termination will be deleted.
-
F
GLOBAL TEMPORARY TABLE space allocation occurs at session start.
Reveal answer details
Close answer details
Question 46
Multiple choice
Which three statements are true about GLOBAL TEMPORARY TABLES? (Choose three.)
-
A
A GLOBAL TEMPORARY TABLE can have only one index.
-
B
A GLOBAL TEMPORARY TABLE can be referenced in the defining query of a view
-
C
DML on GLOBAL TEMPORARY TABLES generates no REDO.
-
D
A GLOBAL TEMPORARY TABLE cannot have a PUBLIC SYNONYM.
-
E
A GLOBAL TEMPORARY TABLE can have multiple indexes.
-
F
A trigger can be created on a GLOBAL TEMPORARY TABLE.
Reveal answer details
Close answer details
Question 47
Multiple choice
In the PROMOTIONS table, the PROMO_BEGIN_DATE column is of data type DATE and the default date format is DD-MON-RR. Which two statements are true about expressions using PROMO_BEGIN_DATE contained in a query? (Choose two.)
-
A
TO_NUMBER(PROMO_BEGIN_DATE) ?5 will return a number.
-
B
PROMO_BEGIN_DATE ?SYSDATE will return a number.
-
C
PROMO_BEGIN_DATE ?SYSDATE will return an error.
-
D
PROMO_BEGIN_DATE ?5 will return a date.
-
E
TO_DATE(PROMO_BEGIN_DATE * 5) will return a date.
Reveal answer details
Close answer details
Question 48
Multiple choice
Which four statements are true regarding primary and foreign key constraints and the effect they can have on table data?
-
A
Only the primary key can be defined at the column and table level.
-
B
The foreign key columns and parent table primary key columns must have the same names.
-
C
It is possible for child rows that have a foreign key to remain in the child table at the time the parent row is deleted.
-
D
A table can have only one primary key but multiple foreign keys.
-
E
Primary key and foreign key constraints can be defined at both the column and table level.
-
F
A table can have only one primary key and one foreign key.
-
G
It is possible for child rows that have a foreign key to be deleted automatically from the child table at the time the parent row is deleted
Reveal answer details
Close answer details
Correct answersC, D, E, G
Question 49
Multiple choice
Which two statements are true about the order by clause when used with a sql statement containing a set operator such as union?
-
A
column positions must be used in the order by clause.
-
B
The first column in the first select of the compound query with the union operator is used by default to sort output in the absence of an order by clause.
-
C
Each select statement in the compound query must have its own order by clause.
-
D
only column names from the first select statement in the compound query are recognized.
-
E
Each select statement in the compound query can have its own order by clause.
Reveal answer details
Close answer details
Question 50
Multiple choice
Examine this statement:  Which two things must be changed for it to execute successfully? (Choose two.)
-
A
The foreign key constraint on DEPT_ID must be defined at the table level instead of the column level.
-
B
The NOT NULL constraint on ENAME must be defined at the column level instead of the table level.
-
C
The primary key constraint on EMP_ID must have a name.
-
D
One of the LONG columns must be changed to a VARCHAR2 or CLOB.
-
E
The word CONSTRAINT in the foreign key constraint on DEPT_ID must be changed to FOREIGN KEY.
Reveal answer details
Close answer details
Question 51
Multiple choice
Which three statements are true about built-in data types? (Choose three.)
-
A
The default length for a CHAR column is always one character.
-
B
A VARCHAR2 blank-pads column values only in the data stored is non-numeric and contains no special characters.
-
C
A VARCHAR2 column definition does not require the length to be specified.
-
D
A CHAR column definition does not require the length to be specified.
-
E
A BLOB stores unstructured binary data within the database.
-
F
A BFILE stores unstructured binary data in operating system files.
Reveal answer details
Close answer details
Question 52
Multiple choice
Which two statements will convert the string Hello World to ello world? (Choose two.)
-
A
SELECT INITCAP(TRIM(`H' FROM `Hello World')) FROM DUAL;
-
B
SELECT SUBSTR(`Hello World', 2) FROM DUAL;
-
C
SELECT LOWER(SUBSTR(`Hello World', 2, 1)) FROM DUAL;
-
D
SELECT LOWER(TRIM(`H' FROM `Hello World')) FROM DUAL;
-
E
SELECT LOWER(SUBSTR(`Hello World', 2)) FROM DUAL;
Reveal answer details
Close answer details
Question 53
Multiple choice
Which two statements are true about Entity Relationships? (Choose two.)
-
A
A one-to-one relationship is always a self-referencing relationship.
-
B
A relationship can be mandatory for both entities.
-
C
A many-to-many relationship can be implemented only by using foreign keys.
-
D
A one-to-many relationship in one direction is a one-to-one relationship in the other direction.
-
E
A table name can be specified just once when selecting data from a table having a self-referencing relationship.
Reveal answer details
Close answer details
Question 54
Single choice
Which statement is true about using functions in WHERE and HAVING?
-
A
Using aggregate functions in the WHERE clause requires a subquery.
-
B
Using aggregate functions in the HAVING clause requires a subquery.
-
C
Using single-row functions in the WHERE clause requires a subquery.
-
D
Using single-row functions in the HAVING clause requires a subquery.
Reveal answer details
Close answer details
Question 55
Single choice
Which statement fails to execute successfully? 
-
A
-
B
-
C
-
D
Reveal answer details
Close answer details
Question 56
Single choice
Examine the description of the EMPLOYEES table:  NLS_DATE_FORMAT is set to DD-MON-YY. Which query requires explicit data type conversion?
-
A
SELECT salary + 120.50 FROM employees;
-
B
SELECT SUBSTR(join date, 1, 2)- 10 FROM employees;
-
C
SELECT join date 11.'11 salary FROM employees;
-
D
SELECT join date FROM employees where join date > *10-02-2018*;
-
E
SELECT join date + 20 FROM employees;
Reveal answer details
Close answer details
Question 57
Multiple choice
Examine the description of the PRODUCT_STATUS table:  The STATUS column contains the values 'IN STOCK' or 'OUT OF STOCK' for each row. Which two queries will execute successfully?
-
A
SELECT prod_id "CURRENT AVAILABILITY" || q'('s not available)' FROM product_status WHERE status = 'OUT OF STOCK';
-
B
SELECT prod_id || q's not available'' FROM product_status WHERE status='OUT OF STOCK';
-
C
SELECT prod_id || q'('s not available)' "CURRENT AVAILABILITY" FROM product_status WHERE status = 'OUT OF STOCK';
-
D
SELECT prod_id || q'('s not available)' FROM product_status WHERE status = 'OUT OF STOCK';
-
E
SELECT prod_id || q'('s not available)' 'CURRENT AVAILABILITY' FROM product_status WHERE status = 'OUT OF STOCK';
-
F
SELECT prod_id || q"'s not available" FROM product_status WHERE status = 'OUT OF STOCK';
Reveal answer details
Close answer details
Question 58
Multiple choice
Examine the description of the CUSTOMERS table:  Which three statements will do an implicit conversion?
-
A
SELECT * FROM customers WHERE insert_date=DATE'2019-01-01';
-
B
SELECT * FROM customers WHERE customer_id='0001';
-
C
SELECT * FROM customers WHERE TO_DATE(insert_date)=DATE'2019-01-01';
-
D
SELECT * FROM customers WHERE insert_date'01-JAN-19';
-
E
SELECT * FROM customers WHERE customer_id=0001;
-
F
SELECT * FROM customers WHERE TO_CHAR(customer_id)='0001';
Reveal answer details
Close answer details
Question 59
Multiple choice
You execute this command: TRUNCATE TABIE depts; Which two are true?
-
A
A ROLLBACK statement can be used to retrieve the deleted data.
-
B
It drops any triggers defined on the table.
-
C
It retains the indexes defined on the table.
-
D
It retains the integrity constraints defined on the table,
-
E
It always retains the space used by the removed rows.
-
F
A FLASHBACK TABLE statement can be used to retrieve the deleted data.
Reveal answer details
Close answer details
Question 60
Multiple choice
Which two statements are true about the ORDER BY clause? (Choose two.)
-
A
In a character sort, the values are case-sensitive.
-
B
NULLS are not included in the sort operation.
-
C
Numeric values are displayed in descending order if they have decimal positions.
-
D
Column aliases can be used in the ORDER BY clause.
-
E
Only columns that are specified in the SELECT list can be used in the ORDER BY clause.
Reveal answer details
Close answer details
Question 61
Multiple choice
Which two statements are true about date/time functions in a session where NLS_DATE_PORMAT is set to DD-MON-YYYY SH24:MI:SS
-
A
SYSDATE can be used in expressions only if the default date format is DD-MON-RR.
-
B
CURRENT_TIMESTAMP returns the same date as CURRENT_DATE.
-
C
CURRENT_DATE returns the current date and time as per the session time zone
-
D
SYSDATE and CURRENT_DATE return the current date and time set for the operating system of the database server.
-
E
CURRENT_TIMESTAMP returns the same date and time as SYSDATE with additional details of functional seconds.
-
F
SYSDATE can be queried only from the DUAL table.
Reveal answer details
Close answer details
Question 62
Multiple choice
Viev the Exhibit and examine the structure of the PRODUCT INFORMATION and INVENTORIEStables.  You have a requirement from the supplies department to give a list containing PRODUCT_ID,SUPPLIER ID, and QUANTITY_ON HAND for all the products where in QUANTITY ON HAND is lessthan five. Which two SQL statements can accomplish the task? (Choose two)
-
A
SELECT product id, quantity on hand, supplier id FROM product information NATURAL JOIN inventories AND quantity .on hand < 5;
-
B
SELECT i. product id, i. quantity .on hand, pi. supplier_id FROM product_information pi JOIN inventories i ON (pi. product. id=i. product id) AND quantity on hand < 5;
-
C
SELECT i. product_id, i. quantity_on hand, pi. supplier id FROM product information pi JOIN inventories i USING (product id) AND quantity .on hand < 5;
-
D
SELECT i.product id, i. quantity on hand, pi. supplier id FROM product information pi JOIN inventories i ON (pi.product id=i. product id)WHERE quantity on hand < 5;
Reveal answer details
Close answer details
Question 63
Single choice
Which statement is true regarding the INTERSECT operator?
-
A
The names of columns in all SELECT statements must be identical.
-
B
-
C
Reversing the order of the intersected tables alters the result.
-
D
The number of columns and data types must be identical for all SELECT statements in the query.
Reveal answer details
Close answer details
Correct answerD
ExplanationINTERSECT Returns only the rows that occur in both queries' result sets, sorting them and removing duplicates. The columns in the queries that make up a compound query can have different names, but the output result set will use the names of the columns in the first query.
|