WizIQ helps you learn and teach online - any subject you can think of!
Join for FREE

Oracle PL/SQL Online Test

The EMPLOYEES table has these columns: LAST_NAME--VARCHAR2 (35) SALARY--NUMBER (8, 2) COMMISSION_PCT--NUMBER (5, 2) You want to display the name and annual salary multiplied by the commission_pct for all employees. For records that have a NULL commission_pct, a zero must be displayed against the calculated column. Which SQL statement displays the desired results?
SELECT last_name, (salary*12)* commission_Pct FROM EMPLOYEES;
SELECT last_name, (salary*12)* IFNULL(commission_pct,0) FROM EMPLOYEES;
SELECT last_name, (salary*12)* NVL2(commission_pct,0) FROM EMPLOYEES;
SELECT last_name, (salary*12)* NVL(commission_pct,0) FROM EMPLOYEES;
Which is true about attributes of iSQL*Plus?
iSQL*Plus commands cannot be abbreviated.
iSQL*Plus commands are accesses from a browser.
iSQL*Plus commands are used to manipulate data in tables.
iSQL*Plus commands manipulate table definitions in the database.
Examine the structure of the EMPLOYEES and DEPARTMENTS tables: EMPLOYEES EMPLOYEE_ID NUMBER DEPARTMENT_ID NUMBER MANAGER_ID NUMBER LAST_NAME VARCHAR2(25) DEPARTMENTS DEPARTMENT_ID NUMBER MANAGER_ID NUMBER DEPARTMENT_NAME VARCHAR2(35) LOCATION_ID NUMBER You want to create a report displaying employee last names, department names, and locations. Which query should you use?
SELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D USING department_id ;
SELECT last_name, department_name, location_id FROM employees NATURAL JOIN departments WHERE e.department_id =d.department_id;
SELECT e.last_name, d.department_name, d.location_id FROM employees e NATURAL JOIN departments d;
SELECT e.last_name, d. department_name, d.location_id FROM employees e NATURAL JOIN departments D
In which of the following case you would not use the USING clause?
You want to create a non equijoin.
The tables to be joined have multiple NULL columns.
The tables to be joined have columns with the same name and compatible data types.
You want to use a NATURAL join, but you want to restrict the number of columns in the join condition.
Which SQL statement displays the date March 19, 2001 in a format that appears as "Nineteenth of March 2001 12:00:00 AM"?
SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth "of" Month YYYY fmHH:MI:SS AM') NEW_DATE FROM dual;
SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'Ddspth "of" Month YYYY fmHH:MI:SS AM') NEW_DATE FROM dual;
SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmDdspth "of" Month YYYY HH:MI:SS AM') NEW_DATE FROM dual;
SELECT TO_CHAR(TO_DATE('19-Mar-2001', 'DD-Mon-YYYY'), 'fmtDdspth "of" Month YYYY fmtHH:MI:SS AM') NEW_DATE FROM dual;
Which statement is true regarding the default behavior of the ORDER BY clause?
Null values are displayed last for descending sequences.
Null values are left out of the sort.
Character values are displayed from Z to A.
Date values are displayed with the earliest value first.
What is true regarding sub queries?
The inner query always sorts the results of the outer query.
The outer query always sorts the results of the inner query.
The outer query must return a value to the inner query.
The inner query returns a value to the outer query.
The database administrator of your company created a public synonym called HR for the HUMAN_RESOURCES table of the GENERAL schema, because many users frequently use this table. As a user of the database, you created a table called HR in your schema. What happens when you execute this query? SELECT * FROM HR;
you obtain the results retrieved from the public synonym HR created by the database administrator
You obtain the results retrieved form the HR table that belongs to your schema.
you get an error message because you cannot retrieve from a table that has the same as a public synonym
You obtain the results retrieved from both the public synonym HR and the HR table that belongs to your schema, as a Cartesian product.
You need to give the MANAGER role the ability to select from insert into and modify existing rows in the STUDENT_GRADES table. Anyone given this MANAGER role should be able to pass those privileges on to others. Which statement accomplishes this?
GRANT select, insert, update ON student_grades TO manager;
GRANT select, insert, update ON student_grades TO ROLE manager
GRANT select, insert, modify ON student_grades TO manager WITH GRANT OPTION;
GRANT select, insert, update ON student_grades TO manager WITH GRANT OPTION ;
Which syntax turns an existing constraint on?
ALTER TABLE table_name ENABLE constraint_name ;
ALTER TABLE table_name STATUS = ENABLE CONSTRAINT constraint name ;
ALTER TABLE table_name ENABLE CONSTRAINT constraint_name ;
ALTER TABLE table_name STATUS ENABLE CONSTRAINT constraint_name ;
DATETIME data types can not be used when specifying which of the following column definitions?
TIMESTAMP
INTERVAL MONTH TO DAY
INTERVAL DAY TO SECOND
INTERVAL YEAR TO MONTH
Which data dictionary table should you query to view the object privileges granted to the user on specific columns?
USER_TAB_PRIVS_MADE
USER_TAB_PRIVS
USER_COL_PRIVS_MADE
USER_COL_PRIVS
Which / SQL* Plus feature can be used to replace values in the where clause?
Substitution variables
replacement variables
prompt variables
instead-of variables
For which constraint does the Oracle Server implicitly create a unique index?
NOT NULL
PRIMARY KEY
FOREIGN KEY
CHECK
In a SELECT statement that includes a WHERE clause, where is the GROUP BY clause placed statement?
before the WHERE clause
before the FROM clause
after the ORDER BY clause
after the WHERE clause
You added a PHONE-NUMBER column of NUMBER data type to an existing EMPLOYEES table. The EMPLOYEES table already contains records of 100 employees. Now, you want to enter the phone numbers of each of the 100 employees into the table some of the employees may not have a phone number available. Which data manipulation operation do you perform?
MERGE
INSERT
UPDATE
ADD
Which statement accurately describes a role?
a user can have access to a maximum of 10 roles
A role can have a maximum of 100 privileges contained in it.
Privileges are given to a role by using the CREATE ROLE statement.
A role is a named group of related privileges that can be granted to the user
Description:

The goal of this test is to do a self assessment of how comfortable you are with querying, adding, updating, and removing data from a database via SQL. It will also help you understand how to extract meaningful information across multiple tables.
Disclaimer: Content, such as images used in the questions (if any), have been picked up from various places for the sole purpose of Instruction.

Tags:

Oracle PL/SQL  DBA  OCA  Oracle  OCP

Comments
manu111
By: manu111
863 days 13 hours 11 minutes ago

good 1

Abhishek
By: Abhishek
824 days 1 hours 16 minutes ago

D option is incorrect answer for third question. Correct answer is C not D.

Abhishek
By: Prashant Singh
265 days 22 hours 1 minutes ago

yes

kiran
By: kiran
808 days 2 hours ago

third question's answer is actually option D test is good

Prasanna
By: Prasanna
798 days 3 hours 18 minutes ago

test is 2gud..

charu
By: charu
777 days 17 hours 36 minutes ago

test is very useful

M. Maruf Hossain
By: M. Maruf Hossain
754 days 20 hours 59 minutes ago

Abhishek is right, answer C and D are identical excpet ; at the end. Oracle requires a ; to finish DML statements, hence C is the correct answer.

shailja
By: shailja
745 days 22 hours 35 minutes ago

this test very useful

Gnanasekaran
By: Gnanasekaran
739 days 23 hours 41 minutes ago

Hi, This is Gnanam. This test is very userful for everyone of oracle developers. Thanks a lot.. Regards, N.Gnanam

Kavita
By: Kavita
737 days 1 hours 44 minutes ago

somw questions were tough,,,need to have complete basic of SQL .

yakubujohn
By: yakubujohn
709 days 16 hours 33 minutes ago

I, really enjoy online and wish other's friend of my to participating on this same online test b/4 go for final certify oracle -ocp examination. Thnx you all 4 the job done. With regards 4rm yakubu

sudhina
By: sudhina
708 days 4 hours 14 minutes ago

VERY GOOD

anup
By: anup
702 days 22 hours 29 minutes ago

good one...

namitha
By: namitha
678 days 23 hours 51 minutes ago

3rd question's answer is C only.

sanat
By: sanat
663 days 4 hours ago

yes for sure 3 que's is C in option D there is a space between the alias d and department name

Kiran
By: Kiran
605 days 6 hours 51 minutes ago

Test was good one.

jayaram
By: jayaram
572 days 19 hours 41 minutes ago

What a test yar....its simply suprb...very useful..jai..

jayaram
By: jayaram
572 days 19 hours 40 minutes ago

dear sir,,,

kindly make this test available for oracle DBA also...

Thaks....

ANEEL KUMAR
By: ANEEL KUMAR
488 days 2 hours 45 minutes ago

pani leni test

Madhavan
By: Madhavan
478 days 20 hours 51 minutes ago

Its very useful

Deepak
By: Deepak
477 days 3 hours 11 minutes ago

THANKS FOR NICE PRACTICE TEST

laxmi
By: laxmi
401 days 22 hours 25 minutes ago

good excercise

chakri
By: chakri
399 days 18 hours 32 minutes ago

it's good thanks for author....

cherri
By: cherri
397 days 5 hours 51 minutes ago

good test!

kc lim
By: kc lim
382 days 2 hours 20 minutes ago

Hi,
thanks a lot, this is really useful for me hava a practice before go to my real test.

tq again.

chaitanya
By: chaitanya
364 days 19 hours 29 minutes ago

very useful

pravudatta
By: pravudatta
333 days 16 hours 16 minutes ago

hmmm nice 1.......

Anshu Bhasin
By: Anshu Bhasin
292 days 11 hours 38 minutes ago

hello sql dba reader

pls tell me anyone where i can get sql certification for sql.
Pls send me ur's reply on e-mail > anshu.bhasin444@gmail.com

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 17 hours ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 16 hours 59 minutes ago

3rd Qstn answer is C not D...

NEER
By: NEER
290 days 16 hours 59 minutes ago

3rd Qstn answer is C not D...

ramesh
By: ramesh
226 days 2 hours 19 minutes ago

i need to attaind more test

asesh
By: asesh
200 days 3 hours 2 minutes ago

Option D is correct for 3rd question because NVL2 should have three parameters whereas its passed with 2 parameters here..

Jeffery
By: Jeffery
178 days 2 hours 7 minutes ago

Very useful :)

nehajain
By: nehajain
166 days 4 hours 3 minutes ago

in quetn no 6 more than 1 ans in correct
1st option is also correct.

sajan varughese
By: sajan varughese
137 days 17 hours 27 minutes ago

Kunna

Want to learn?

Sign up and browse through relevant courses.

Name:
Your Email:
Password:
Country:
Contact no.:


Area code Number
Subject you are interested in:
Word verification: (Enter the text as in image)


Sign Up Already a member? Sign In
I agree to WizIQ's User Agreement & Privacy Policy

Your Facebook Friends on WizIQ

More Tests By Author

ASP Server Controls
10 Questions | 227 Attempts

ASP.NET, Namespaces ASP.NET
10 Questions | 855 Attempts

An ASP.NET Application
10 Questions | 173 Attempts

Test your basic knowledge on DATASTRUCTURES, STACK
10 Questions | 410 Attempts