Examine this query which executes successfully;
Select job,deptno from emp
Union all
Select job,deptno from jobs_history;
What will be the result?
Examine the description of the EMPLOYEES table:
NLS_DATE FORMAT is DD-MON-RR.
Which two queries will execute successfully?
Examine this description of the PRODUCTS table:
You successfully execute this command:
CREATE TALE new_prices(prod_id NUBER(2),price NUMBER(8,2));
Which two statements execute without errors?
Examine the description of the CUSTOMERS table:
Which three statements will do an implicit conversion?
Which two are true about queries using set operators (UNION, UNION ALL, INTERSECT and MINUS)?
Which two statements are true about transactions in the Oracle Database server?
You execute these commands successfully:
CREATE GLOBAL TEMPORARY TABLE invoices _ gtt
( customer id INTEGER,
invoice_ total NUMBER (10, 2)
) ON COMMIT PRESERVE ROWS;
INSERT INTO invoices_ gtt VALUES (1, 100);
COMMIT;
Which two are true?
Which three statements are true about dropping and unused columns in an Oracle database?
Examine the BRICKS table:
You write this query:
SELECT
FROM bricks b1 CROSS JOIN bricks b2
WHERE b1. Weight < b2. Weight:
How many rows will the query return?
The STORES table has a column START_ DATE of data type DATE, containing the date the row was inserted.
You only want to display details of rows where START_ DATE is within the last 25 months.
Which WHERE clause can be used?
The INVOICE table has a QTY_SOLD column of data type NUMBER and an INVOICE_DATE column of data type DATE NLS_DATE_FORMAT is set to DD-MON-RR.
Which two are true about data type conversions involving these columns in query expressions?
Examine these two queries and their output:
SELECT deptno, dname FROM dept;
SELECT ename, job, deptno FROM emp ORDER BY deptno;
Now examine this query:
SELECT ename, dname
FROM emp CROSS JOIN dept WHERE job = 'MANAGER'
AND dept.deptno IN (10, 20) ;
Examine this incomplete query:
SELECT DATA’2019-01-01’+
FROM DUAL;
Which three clauses can replace
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
Examine the data in the ENPLOYEES table:
Which statement will compute the total annual compensation tor each employee?
An Oracle database server session has an uncommitted transaction in progress which updated 5000 rows
in a table.
In which three situations does the transact ion complete thereby committing the updates?
Evaluate these commands which execute successfully CREATE SEQUENCE ord_seq
INCREMENT BY 1
START WITH 1
MAXVALUE 100000
CYCLE
CACHE 5000;
Create table ord_items(
ord_no number(4) default ord_seq.nextval not null,
Item_no number(3),
Qty number(3),
Expiry_date date,
Constraint it_pk primary key(ord_no,item_no),
Constraint ord_fk foreign key (ord_no) references orders(ord_no));
Which two statements are true about the ORD_ITEMS table and the ORD_SEQ sequence?
The SYSDATE function displays the current Oracle Server date as:
21 -MAY-19
You wish to display the date as:
MONDAY, 21 MAY, 201 9
Which statement will do this?
The STORES table has a column START_DATE of data type DATE, containing the datethe row was inserted.
You only want to display details of rows where START_DATEis within the last 25 months.which WHERE clause can be used?
Examine this statement:
Which two things must be changed for it to execute successfully?
Examine this partial query:
SELECT ch.channel_type, t.month, co.country_code, SUM(s.amount_sold) SALES
FROM sales s, times t, channels ch, countries co
WHERE s.time_ id = t.time id
AND s.country_ id = co. country id
AND s. channel id = ch.channel id
AND ch.channel type IN ('Direct Sales', 'Internet')
AND t.month IN ('2000-09', '2000-10')
AND co.country code IN ('GB', 'US')
Examine this output:
Which GROUP BY clause must be added so the query returns the results shown?
Which two statements are true about the results of using the INTERSECT operator in compound queries?
Examine the data in the COLORS table:
Examine the data in the BRICKS table:
Which two queries return all the rows from COLORS?
Examine this statement:
SELECT last name
FROM employees
ORDER BY CASE WHEN salary = (SELECT MAX(salary) FROM employees)
THEN ‘A’
ELSE last_ name
END ,last_name DESC;
Which two statements are true?
Examine these statements:
CREATE TABLE dept (
deptno NUMBER PRIMARY KEY,
diname VARCHAR2(10) ,
mgr NUMBER ,
CONSTRAINT dept_fkey FOREIGN KEY(mgr) REFERENCES emp (empno));
CREATE TABLE emp (
Empno NUMBER PRIMARY KEY,
Ename VARCHAR2 (10) ,
deptno NUMBER,
CONSTRAINT emp_fkey FOREIGN KEY (deptno) REFERENCES dept (deptno) DISABLE);
ALTER TABLE emp MODIFY CONSTRAINT emp_fkey ENABLE;
Which two are true?
Examine this partial command:
CREATE TABLE cust(
cust_id NUMBER(2),
credit_limit NUMBER(10)
ORGANIZATION EXTERNAL
Which two clauses are required for this command to execute successfully?
You issued this command: DROP TABLE hr. employees;
Which three statements are true?
Examine the description of the EMPLOYEES table:
Which two queries return rows for employees whose manager works in a different department?
Evaluate the following SQL statement
SQL>SELECT promo_id, prom _category FROM promotions
WHERE promo_category=’Internet’ ORDER BY promo_id
UNION
SELECT promo_id, promo_category FROM Pomotions
WHERE promo_category = ‘TV’
UNION
SELECT promoid, promocategory FROM promotions WHERE promo category=’Radio’
Which statement is true regarding the outcome of the above query?
Examine the description of the PRODUCTS table:
Which three queries use valid expressions?
Which two statements are true about the results of using the intersect operator in compound queries?
Examine this query:
SELECT TRUNC (ROUND(156.00,-2),-1) FROM DUAL; What is the result?
Examine the description of the SALES1 table:
SALES2 is a table with the same description as SALES1,
Some sales data is duplicated In both tables.
You want to display the rows from the SALES1 table which are not present in the SALIES2 table.
Which set operator generates the required output?
Examine the ORDER _ITEms table:
Which two queries return rows where QUANTITY is a multiple of ten?
Which three statements are true about time zones, date data types, and timestamp data types in an Oracle database?
Examine this business rule:
Each student can work on multiple projects and each project can have multiple students.
You must design an Entity Relationship(ER) model for optimal data storage and allow for generating reports in this format:
Which two statements are true?
Examine these statements which execute successfully:
Both statements display departments ordered by their average salaries.
Which two are true?
Which three statements are true about sequences in a single instance Oracle database?
The ORDERS table has a column ORDER_DATE of date type DATE The default display format for a date is DD-MON-RR
Which two WHERE conditions demonstrate the correct usage of conversion functions?
Which two statements are true about selecting related rows from two tables based on entity relationship diagram (ERD)?
You create a table by using this command:
CREATE TABLE rate_list (rate NUMBER(6,2));
Which two are true about executing statements?
Examine these requirements:
1. Display book titles for books purchased before January 17, 2007 costing less than 500 or more than 1000.
2. Sort the titles by date of purchase, starting with the most recently purchased book.
Which two queries can be used?
Which four statements are true regarding primary and foreign key constraints and the effect they can have on table data?
Examine this SQL statement:
SELECT cust_id, cust_last_name "Last Name
FROM customers
WHERE countryid=10
UNION
SELECT custid CUSTNO, cust_last_name
FROM customers
WHERE countryid=30
Identify three ORDER BY clauses, any one of which can complete the query successfully.
You execute this query:
SELECT TO CHAR (NEXT_DAY(LAST_DAY(SYSDATE),’MON’ ),’ dd“Monday for” fmMonth rrr’) FROM DUAL;
What is the result?
Examine these statements executed in a single Oracle session:
CREATE TABLE product (pcode NUMBER(2),pname VARCHAR2(20));
INSERT INTO product VALUES(1,'pen');
INSERT INTO product VALUES (2,'pencil');
INSERT INTO product VALUES(3,'fountain pen');
SAVEPOINT a;
UPDATE product SET pcode=10 WHERE pcode =1;
COMMIT;
DELETE FROM product WHERE pcode =2;
SAVEPOINT b;
UPDATE product SET pcode=30 WHERE pcode =3;
SAVEPOINT c;
DELETE FROM product WHERE pcode =10;
ROLLBACK TO SAVEPOINT b;
COMMIT;
Which three statements are true?
Which two statements will return the names of the three employees with the lowest salaries?
Examine the data in the PRODUCTS table:
Examine these queries:
1. SELECT prod name, prod list
FROM products
WHERE prod 1ist NOT IN(10,20) AND category _id=1;
2. SELECT prod name, | prod _ list
FROM products
WHERE prod list < > ANY (10,20) AND category _id= 1;
SELECT prod name, prod _ list
FROM products
WHERE prod_ list <> ALL (10, 20) AND category _ id= 1;
Which queries generate the same output?
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:
SELECT prod id
FROM costs
WHERE promo id IN
(SELECT promo id
FROM promotions
WHERE promo_cost < ALL
(SELECT MAX (promo cost)
FROM promotions
GROUP BY (promo_end date-promo_begin_date)) );
What will be the result?
The ORDERS table has a primary key constraint on the ORDER_ID column.
The ORDER_ITEMS table has a foreign key constraint on the ORDER_ID column, referencing the primary key of the ORDERS table.
The constraint is defined with on DELETE CASCADE.
There are rows in the ORDERS table with an ORDER_TOTAL less than 1000.
Which three DELETE statements execute successfully?
Examine the description of the BOOKS_TRANSACTIONS table:
Examine this partial SQL statement:
SELECT * FROM books_transactions
Which two WHERE conditions give the same result?