Get Full Version of the Exam
http://www.EnsurePass.com/1z0-061.html
Question No.81
A view and a synonym are created as follows:
create view dept_v as select * from dept; create synonym dept_s for dept_v; Subsequently the table DEPT is dropped.
What will happen if you query the synonym DEPT_S ? (Choose the best answer.)
-
There will not be an error because the synonym addresses the view, which still exists, but there will beno rows returned.
-
There will not be an error if you first recompile the view with the command ALTER VIEW DEPT_VCOMPILE FORCE;
-
There will be an error because the synonym will be invalid.
-
There will be an error because the view will be invalid.
-
There will be an error because the view will have been dropped implicitly when the table was dropped.
Correct Answer: D
Explanation:
The synonym will be fine, but the view will be invalid. Oracle will attempt to recompile the view, but this will fail.
Question No.82
A UNIQUE constraint on a column requires an index. Which of the following scenarios is correct? (Choose one or more correct answers.)
-
If a UNIQUE index already exists on the column, it will be used.
-
If a NONUNIQUE index already exists it will be used.
-
If a NONUNIQUE index already exists on the column, a UNIQUE index will be created implicitly.
-
If any index exists on the column, there will be an error as Oracle attempts to create another index implicitly.
Correct Answer: AB
Question No.83
You want to display 5 percent of the employees with the highest salaries in the EMPLOYEES table. Which query will generate the required result?
-
Option A
-
Option B
-
Option C
-
Option D
Correct Answer: B
Explanation:
FETCH can only be used with FIRST OR NEXT. The syntax is:
FETCH { FIRST | NEXT } [integer-literal | ? ] {ROW | ROWS} ONLY OFFSET { integer-literal | ? }
{ROW | ROWS}
Question No.84
Which create table statement is valid?
-
Option A
-
Option B
-
Option C
-
Option D
Correct Answer: D
Explanation:
PRIMARY KEY Constraint
A PRIMARY KEY constraint creates a primary key for the table. Only one primary key can be created for each table. The PRIMARY KEY constraint is a column or a set of columns that uniquely identifies each row in a table. This constraint enforces the uniqueness of the column or column combination and ensures that no column that is part of the primary key can contain a null value.
Note:
Because uniqueness is part of the primary key constraint definition, the Oracle server enforces the uniqueness by implicitly creating a unique index on the primary key column or columns.
Incorrect:
Not A: Two primary keys are not allowed.
Not B: You cannot specific a column to be both UNIQUE and NOT NULL. Not C: The default value cannot be NOT NULL.
Question No.85
Study this view creation statement:
create view dept30 as select department_id,employee_id,last_name from employees where department_id=30 with check option;
What might make the following statement fail? (Choose the best answer.) update dept30 set department_id=10 where employee_id=114;
-
Unless specified otherwise, views will be created as WITH READ ONLY.
-
The view is too complex to allow DML operations.
-
The WITH CHECK OPTION will reject any statement that changes the DEPARTMENT_ID.
-
The statement will succeed.
Correct Answer: C
Explanation:
INCORRECT: A, B, and D are incorrect. A is incorrect because views are, by default, created read-write. B is incorrect because the view is a simple view. D is incorrect because the statement cannot succeed because the CHECK option will reject it.
Question No.86
View the Exhibit and examine the data in the PROMO_NAME and PROMO_END_DATE columns of the promotions table, and the required output format.
Which two queries give the correct result?
-
Option A
-
Option B
-
Option C
-
Option D
Correct Answer: CD
Question No.87
View the Exhibit and examine the description of SALES and PROMOTIONS tables.
You want to delete rows from the sales table, where the PROMO_NAME column in the promotions table has either blowout sale of everyday low prices as values.
Which three delete statements are valid?
-
Option A
-
Option B
-
Option C
-
Option D
Correct Answer: BCD
Question No.88
You issue the following command to alter the country column in the departments table:
Which statement is true?
-
It produces an error because column definitions cannot be altered to add default values.
-
It executes successfully and all the rows that have a null value for the country column will be updated with the value #39;USA#39;.
-
It executes successfully. The modification to add the default value takes effect only from subsequent insertions to the table.
-
It produces an error because the data type for the column is not specified.
Correct Answer: C
Explanation:
It does not affect old lines.
Question No.89
You issue the following command to drop the products table:
SQLgt; DROP TABLE products;
Which three statements are true about the implication of this command? (Choose three.)
-
All data along with the table structure is deleted.
-
A pending transaction in the session is committed.
-
All indexes on the table remain but they are invalidated.
-
All views and synonyms remain but they are invalidated.
-
All data in the table is deleted but the table structure remains.
Correct Answer: ABD
Explanation:
A: The DROP TABLE statement moves a table or object table to the recycle bin.
B: If a user issues a DDL (CREATE, ALTER, or DROP) or DCL (GRANT or REVOKE) command, the transaction in progress (if any) will
Incorrect:
Not C: Dropping a table invalidates dependent objects, such as indexes and constraints.
Question No.90
You need to display the date ll-oct-2007 in words as `Eleventh of October, Two Thousand Seven#39;. Which SQL statement would give the required result?
-
Option A
-
Option B
-
Option C
-
Option D
Correct Answer: C
Explanation:
The #39;11-oct-2007#39; is a string not a date. We need to user the TO_DATE function and convert it to a date.
Get Full Version of the Exam
1z0-061 Dumps
1z0-061 VCE and PDF