Home » Oracle » Oracle sql online test

Oracle sql online test

Oracle sql online test

Oracle SQL is the widely used in various Products. Having a knowledge in Oracle SQL is plus point.

This Oracle sql online test check the understanding on various topics like Oracle table, Oracle view ,constraints, type of index, sequences, subqueries , oracle joins ,materialized view, primary key constraints , single row function ,sql queries and many more

The below test is randomized sql test and select 15 questions from the set of many questions,so each time you try to attempt it, you will get different questions in different order and option would also be in different order, So it will be fun practicing with this tool. You can try as many times as you want till you feel comfortable about it

Instructions for online test

1.This quiz consists of 15 questions .It is recommended to complete the test in 30 min
2. It consists both single choice and more than  one choice questions to test your knowledge
3. You can press the submit button at the end of your test and get the final score
4.You will also get the know the correct choice after you finished the test.

1. Examine the following command:

CREATE TABLE pay_master
(employee-id Number(9)
CONSTRAINT pay-pk PRIMARY KEY,
2000-pay NUMBER(8,2)
manager-name VARCHAR2(25)
CONSTRAINT mgr-name-nn. NOT NULL,
pay-96 NUMBER(8,2));

Which two lines of this command will return an error?

Question 1 of 15

2. You need to create a report to display the ship date and order totals of your order table. If the order has not been shipped your report must display not shipped. If the total is not available your report must say not available. In the order table the ship date column has a data type of date the total column has a data type of number. Which statement do you use to create this report?

Question 2 of 15

See also  What is FND_OAM_CONTEXT_FILES used for? All about it

3. Examine the WORKER table below:

NAME NULL TYPE
WORKER ID NOT NULL NUMBER(3)
NAME NOT NULL VARCHAR2(25)
PHONE NOT NULL VARCHAR2(9)
ADDRESS VARCHAR2(50)
POSITION UPDATE

There are hundreds of records in the EMPLOYEE TABLE. You need to modify the phone column to hold only number values. Which statement will modify the data type appropriately?

Question 3 of 15

4. You query a database with the following command:

SELECT dept_no, AVG (MONTHS_BETWEEN (SYSDATE, hire_date)) FROM worker_company
WHERE AVG (MONTHS_BETWEEN (SYSDATE, hire_date)) > 60
GROUP BY dept_no
ORDER BY AVG (MONTHS_BETWEEN (SYSDATE, hire_date) )

Where does the statement cause an error?

Question 4 of 15

5. How would you add a foreign key constraint on the dept_no column in the EMP table. Referring to the ID column in the DEPT table?

Question 5 of 15

6. You must permanently remove all data from the sales_data table, but will need the table structure in the future. What single command should be issued?

Question 6 of 15

Question 7 of 15

8. You need to analyze how long your orders to be shipped from the date that the order is placed. To do this you must create a report that displays the customer number, date order, date shipped and the number of months in whole numbers from the time the order is placed to the time the order is shipped. Which statement produces the
required results?

Question 8 of 15

9. The emp table contains these columns:
FIRST-NAME VARCHER2(25)
COMISSION NUMBER(3,2)
Evaluate this SQL statement
SELECT first-name,commission FROM emp WHERE commission= (SELECT comission FROM emp WHERE UPPER(first-name)= ‘smith’)
Which statement will cause this statement to fail?

Question 9 of 15

10. The emp table contains these columns:
Last_name Varchar2 (25)
First_name Varchar2 (25)
Salary Number7, 2
You need to display the names of employees on more than an average salary of all
employees. Evaluate the SQL statement.
SELECT, LAST_NAME, FIRST_NAME from emp where salary< avg(salary);

Which change should you make to achieve the desired results?

Question 10 of 15

See also  Troubleshooting 12c database issues with EBS

11. Your company will be granting workers a $150 salary increase. You need to evaluate results of the increase from the worker table prior to the actual modification. You do not want to store in the results in the current database. Which of the following is untrue?

Question 11 of 15

12. What should be done after each fetch statement in a PL/SQL block?

Question 12 of 15

13. You need to test if the current fetch within a PL/SQL loop was successful. Which cursor attribute is needed to accomplish this task?

Question 13 of 15

14. What command should be used to execute a script file named create_table.sql from the SQL Plus environment?

Question 14 of 15

15. A group function produces ______.

Question 15 of 15


 

I hope you like this Oracle sql online test and it helps in your examination preparation. Best of Luck for the Oracle certification Examination. Please do provide feedback on it. We will also be adding more quizes and questions in future.

Happy Learning!!!!

Related Articles
How to prepare for OCI Associate Certified Examination
Oracle Sql Tutorials
Tips for Passing OCI examination
Oracle Performance & Tuning Quiz

Leave a Comment

Your email address will not be published. Required fields are marked *

Scroll to Top