QUESTION NO: 58
You are currently located in Singapore and have connected to a remote database in Chicago.
You issue the following command:
Exhibit:
PROMOTIONS is the public synonym for the public database link for the PROMOTIONS table.
What is the outcome?
A. Number of days since the promo started based on the current Singapore data and time.
B. An error because the ROUND function specified is invalid
C. An error because the WHERE condition specified is invalid
D. Number of days since the promo started based on the current Chicago data and time
Answer: D(日期-日期,返回的是天数,是一个数字,
QUESTION NO: 57
Examine the structure of the MARKS table:
Exhibit:
Which two statements would execute successfully? (Choose two.)
A. SELECT student_name,subject1
FROM marks
WHERE subject1 > AVG(subject1);
B. SELECT student_name,SUM(subject1)
FROM marks
WHERE student_name LIKE 'R%';
C. SELECT SUM(subject1+subject2+subject3)
FROM marks
WHERE student_name IS NULL;
D. SELECT SUM(DISTINCT NVL(subject1,0)), MAX(subject1)
FROM marks
WHERE subject1 > subject2;
Answer: C,D
QUESTION NO: 56
Examine these statements:
CREATE ROLE registrar;
GRANT UPDATE ON student_grades TO registrar;
GRANT registrar to user1, user2, user3;
What does this set of SQL statements do?
A. The set of statements contains an error and does not work.
B. It creates a role called REGISTRAR, adds the MODIFY privilege on the STUDENT_GRADES
object to the role, and gives the REGISTRAR role to three users.
C. It creates a role called REGISTRAR, adds the UPDATE privilege on the STUDENT_GRADES
object to the role, and gives the REGISTRAR role to three users.
D. It creates a role called REGISTRAR, adds the UPDATE privilege on the STUDENT_GRADES
object to the role, and creates three users with the role.
E. It creates a role called REGISTRAR, adds the UPDATE privilege on three users, and gives the
REGISTRAR role to the STUDENT_GRADES object.
F. It creates a role called STUDENT_GRADES, adds the UPDATE privilege on three users, and
gives the UPDATE role to the registrar.
Answer: C
Explanation: the statement will create a role call REGISTRAR, grant UPDATE on student_grades
to registrar, grant the role to user1,user2 and user3.
Incorrect answer:
Oracle 1z0-051 Exam
"Pass Any Exam. Any Time." - 100% Pass Guarantee 47
Athe statement does not contain error
Bthere is no MODIFY privilege
Dstatement does not create 3 users with the role
Eprivilege is grant to role then grant to user
Fprivilege is grant to role then grant to user
QUESTION NO: 55
You work as a database administrator at ABC.com. You study the exhibit carefully.
Exhibit:
Which two SQL statements would execute successfully? (Choose two.)
A.
UPDATE promotions
SET promo_cost = promo_cost+ 100
WHERE TO_CHAR(promo_end_date, 'yyyy') > '2000';
B.
SELECT promo_begin_date
FROM promotions
WHERE TO_CHAR(promo_begin_date,'mon dd yy')='jul 01 98';
C.
UPDATE promotions
SET promo_cost = promo_cost+ 100
WHERE promo_end_date > TO_DATE(SUBSTR('01-JAN-2000',8));
D.
SELECT TO_CHAR(promo_begin_date,'dd/month')
FROM promotions
WHERE promo_begin_date IN (TO_DATE('JUN 01 98'), TO_DATE('JUL 01 98'));
Answer: A,B
QUESTION NO: 54
Which statements are correct regarding indexes? (Choose all that apply.)
A. For each data manipulation language (DML) operation performed, the corresponding indexes are automatically updated.
B. A nondeferrable PRIMARY KEY or UNIQUE KEY constraint in a table automatically creates a unique index.
C. A FOREIGN KEY constraint on a column in a table automatically creates a non unique key
D. When a table is dropped, the corresponding indexes are automatically dropped
Answer: A,B,D
A正确,在删除表时,会删除相应的索引。QUESTION NO: 53
The PRODUCTS table has the following structure:
Which statement is true regarding the outcome?
A. Both the statements execute and give the same result
B. Both the statements execute and give different results
C. Only the second SQL statement executes successfully
D. Only the first SQL statement executes successfully
QUESTION NO: 52
View the Exhibit and evaluate structures of the SALES, PRODUCTS, and COSTS tables.
Evaluate the following SQL statements:
Which statement is true regarding the above compound query?
A. It shows products that have a cost recorded irrespective of sales
B. It shows products that were sold and have a cost recorded
C. It shows products that were sold but have no cost recorded
D. It reduces an error
Answer: C
QUESTION NO: 51
Examine the structure of the EMPLOYEES table:
Which UPDATE statement is valid?
A.UPDATE employees SET first_name = ‘John’ SET last_name = ‘Smith’ WHERE employee_id = 180;
B.UPDATE employees SET first_name = ‘John’,SET last_name = ‘Smoth’ WHERE employee_id = 180;
C.UPDATE employee SET first_name = ‘John’ AND last_name = ‘Smith’ WHERE employee_id = 180;
D.UPDATE employee SET first_name = ‘John’, last_name = ‘Smith’ WHERE employee_id = 180;
Answer: D
QUESTION NO: 50
View the Exhibits and examine the structures of the PROMOTIONS and SALES tables.
Evaluate the following SQL statements:
Which statement is true regarding the output of the above query?
A. It gives details of product IDs that have been sold irrespective of whether they had a promo or not
B. It gives the details of promos for which there have been no sales
C. It gives the details of promos for which there have been sales
D. It gives details of all promos irrespective of whether they have resulted in a sale or not
Answer: D
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/29876893/viewspace-1647983/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/29876893/viewspace-1647983/