20 Questions

Oracle database sql Quiz

1 :-

In your session, the NLS_DATE_FORMAT is DD-MM-YYYY. There are 86400 seconds in a day. Examine this result: DATE ----------- 02-JAN-2020 Which statement returns this?

2 :-

Which two statements are true regarding indexes? (Choose two.)

3 :-

Which two statements are true about the SET VERIFY ON command? (Choose two.)

 

4 :-

Which two actions can you perform with object privileges? (Choose two.)

 

5 :-

The EMPLOYEES table contains columns EMP_ID of data type NUMBER and HIRE_DATE of data type DATE. You want to display the date of the first Monday after the completion of six months since hiring. The NLS_TERRITORY parameter is set to AMERICA in the session and, therefore, Sunday is the first day of the week.Which query can be used?

6 :-

Examine this SQL statement:

update orders 0

set customer _name=

(select cast _last  _name

from customers

where customer_id = 0 customer_id);

Which two are true? (Choose two.)

7 :-

Which two are true about granting object privileges on tables, views, and sequences? (Choose two.)

8 :-

Which two statements are true about TRUNCATE and DELETE? (Choose two.)

9 :-

Examine these SQL statements which execute successfully:

create table emp 

( emo_no number(2)constraint emp_emp_no_pk primary key ,

ename      varchar2(15),

salary        number(8,2),

mgr_no     number(2));

alter  table emp add constraint emp_mgr_fk

foreign key (mgr_no)

references emp ( emp_no)

on delete set null ;

alter table emp 

disable constraint emp-emp-no-pk

cascade;

alter table emp

enable constraint emp-emp -no-pk;

Which two statements are true after execution? (Choose two.)

10 :-

Which two statements are true about *_TABLES views? (Choose two.)

11 :-

Which two statements are true about the COUNT function? (Choose two.)

12 :-

Table EMPLOYEES contains columns including EMPLOYEE_ID, JOB_ID and SALARY. Only the EMPLOYEE_ID column is indexed. Rows exist for employees 100 and 200. Examine this statement:

UPDATE EMPLOYEES

SET (JOB_ ID SALARY ) =

(SELECT JOB _ID , SALARY 

FROM EMPLOYEES

WHERE EMPLOYEES _ID =200

WHERE EMPLOYEES _ID =100;

Which two statements are true? (Choose two.)

 

 

13 :-

Which two are true? (Choose two.)

14 :-

Examine this statement:

SELECT 1 AS ID ‘JOHN’ AS FIRST NAME , NULL AS COMMISION

FROM DUAL

INTERSECT

SELECT 1 ‘JOHN ’ NULL 

FROM DUAL 

ORDER BY 3;

What is returned upon execution?

 

15 :-

Examine the data in the INVOICES table:

INVOICE ID                          CURRENCY  CODE                     RAISED  _DATE

1                                               EUR                                             01-JAN-2019

2                                               USD                                             01- FEB -2019

3                                               JPY                                               31-MAR-2019

CURRENCY _ CODE

JPY

GPB

CAD

EUR

USD

Examine the data in the CURRENCIES table:

A)    SELECT   *   FROM CURRENCIES

         WHERE NOT EXISTS (

         SELECT NULL FROM INVOICES WHERE CURRENCY-CODE =CURRENCY_CODE);

B)   SELECT  * FROM CURRENCIES

MINUS

SELECT * FROM INVOICES ;

C)  SELECT CURRENCY -CODE FROM CURRENCIES

MINUS

SELECT CURRENCY _CODE FROM INVOICES

D)   SELECT CURRENCY _CODE FROM CURRENCIES

INTERSECT 

SELECT CURRENCY _ CODE FROM INVOICES ;

Which query returns the currencies in CURRENCIES that are not present in INVOICES?

 

 

16 :-

Which two statements are true about an Oracle database? (Choose two.)

17 :-

Examine the description of the PROMOTIONS table:

name                              null                         type

promo_id                not null                      number (6)

promo_name         not null                      varchar2(30)

promo_category    not null                      varchar2(30)

promo_cost           not null                        number (10,2)

You want to display the unique promotion costs in each promotion category. Which two queries can be used? (Choose two.)

18 :-

Which three are true about scalar subquery expressions? (Choose three.)

19 :-

Which two are true about the precedence of operators and conditions? (Choose two.)

 

20 :-

Which three statements are true about Structured Query Language (SQL)? (Choose three.)

Mock Test Completion Certificate
You scored 0 out of 20 questions.

🏅

For your extraordinary service and contributions to your profession.
We are delighted in providing this certificate to you.

Tips for improving your score:

  • Make sure to read the questions and answer choices carefully.
  • Don't try to answer any choices that you don't know. It's better to skip a question.