SQL TEST

Please enter your email:

1.

In which case would you use a FULL OUTER JOIN?

 



 

 

 

 

 

 

2.

For which two constraints does the Oracle Server implicitly create a unique index?

(Choose two.)




 

 

 

 

 

3.

Which statement explicitly names a constraint?




 

 

 

 

 

4.

Management has asked you to calculate the value 12*salary* commission_pct for all the employees in the EMP table. The EMP table contains these columns:

LAST NAME VARCNAR2(35) NOT NULL
SALARY NUMBER(9,2) NOT NULL
COMMISION_PCT NUMBER(4,2)

Which statement ensures that a value is displayed in the calculated columns for all employees?




 

 

 

 

5.

Examine the description of the STUDENTS table:

STD_ID NUMBER(4)
COURSE_ID VARCHARD2(10)
START_DATE DATE
END_DATE DATE

Which two aggregate functions are valid on the START_DATE column? (Choose two)




 

 

 

 

 

 

6.

Which three possible values can be set for the TIME_ZONE session parameter by using the ALTER SESSION command?

(Choose three.)

 

 

 

 

 

7.

Evaluate the SQL statement:

1 SELECT a.emp_name, a.sal, a.dept_id, b.maxsal
2 FROM employees a,
3 (SELECT dept_id, MAX(sal) maxsal
4. FROM employees
5 GROUP BY dept_id) b
6 WHERE a.dept_id = b.dept_id
7 AND a.sal < b.maxsal;

 

What is the result of the statement?




 

 

 

 

 

8.

EMPDET is an external table containing the columns EMPNO and ENAME.

Which command would work in relation to the EMPDET table?




 

 

 

 

9.

The EMP table contains these columns:

LAST NAME VARCHAR2(25)
SALARY NUMBER(6,2)
DEPARTMENT_ID NUMBER(6)

You need to display the employees who have not been assigned to any department. You write the SELECT statement:

SELECT LAST_NAME, SALARY, DEPARTMENT_ID FROM EMP
WHERE DEPARTMENT_ID = NULL;

What is true about this SQL statement?




 

 

 

 

10.

What is necessary for your query on an existing view to execute successfully?




 

 

 

 

11.

Examine the structure of the EMPLOYEES table:

EMPLOYEE_ID NUMBER Primary Key
FIRST_NAME VARCHAR2(25)
LAST_NAME VARCHAR2(25)

Which three statements inserts a row into the table? (Choose three)




 

 

 

 

 

 

12.

Evaluate the set of SQL statements:

CREATE TABLE dept (deptno NUMBER(2),dname VARCNAR2(14), loc VARCNAR2(13));

ROLLBACK;

DESCRIBE DEPT

What is true about the set?




 

 

 

 

13.

The EMPLOYEE tables 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?




 

 

 

 

14.

You need to modify the STUDENTS table to add a primary key on the STUDENT_ID column. The table is currently empty.

Which statement accomplishes this task?

 



 

 

 

 

 

15.

Which /SQL*Plus feature can be used to replace values in the WHERE clause?




 

 

 

 

 

Share this
Share

Question 1 of 15

Share this
Share

Leave a Comment

Share