1.
Evaluate the following statements: CREATE TABLE digits (id NUMBER(2), description VARCHAR2(15)); INSERT INTO digits VALUES (1,'ONE'); UPDATE digits SET description ='TWO' WHERE id=1; INSERT INTO digits VALUES (2,'TWO'); COMMIT; DELETE FROM digits; SELECT description FROM digits VERSIONS BETWEEN TIMESTAMP MINVALUE AND MAXVALUE; What would be the outcome of the above query?
2.
Which statements are correct regarding indexes? (Choose all that apply.)
3.
User OE, the owner of the ORDERS table, issues the following command: GRANT SELECT ,INSERT ON orders TO hr WITH GRANT OPTION; The user HR issues the following command: GRANT SELECT ON oe.orders TO scott; Then, OE issues the following command: REVOKE ALL ON orders FROM hr; Which statement is correct?
4.
SCOTT is a user in the database. Evaluate the commands issued by the DBA: 1 - CREATE ROLE mgr; 2 - GRANT CREATE TABLE, SELECT ON oe.orders TO mgr; 3 - GRANT mgr, create table TO SCOTT; Which statement is true regarding the execution of the above commands?
5.
Which statement best describes the GROUPING function?
6.
Given below are the SQL statements executed in a user session: CREATE TABLE product (pcode NUMBER(2), pname VARCHAR2(10)); INSERT INTO product VALUES(1, 'pen'); INSERT INTO product VALUES (2,'pencil'); SAVEPOINT a; UPDATE product SET pcode = 10 WHERE pcode = 1; SAVEPOINT b; DELETE FROM product WHERE pcode = 2; COMMIT; DELETE FROM product WHERE pcode=10; ROLLBACK TO SAVEPOINT a; Which statement describes the consequences?
7.
Evaluate the following CREATE TABLE command: CREATE TABLE order_item (order_id NUMBER(3), item_id NUMBER(2), qty NUMBER(4), CONSTRAINT ord_itm_id_pk PRIMARY KEY (order_id,item_id) USING INDEX (CREATE INDEX ord_itm_idx ON order_item(order_id,item_id))); Which statement is true regarding the above SQL statement?
8.
Which mandatory clause has to be added to the following statement to successfully create an external table called EMPDET? CREATE TABLE empdet (empno CHAR(2), ename CHAR(5), deptno NUMBER(4)) ORGANIZATION EXTERNAL (LOCATION ('emp.dat'));
9.
Evaluate the following statement: CREATE TABLE bonuses(employee_id NUMBER, bonus NUMBER DEFAULT 100); The details of all employees who have made sales need to be inserted into the BONUSES table. You can obtain the list of employees who have made sales based on the SALES_REP_ID column of the ORDERS table. The human resources manager now decides that employees with a salary of $8,000 or less should receive a bonus. Those who have not made sales get a bonus of 1% of their salary. Those who have made sales get a bonus of 1% of their salary and also a salary increase of 1%. The salary of each employee can be obtained from the EMPLOYEES table. Which option should be used to perform this task most efficiently?
10.
Which statement is true regarding the ROLLUP operator specified in the GROUP BY clause of a SQL statement?