Professional Documents
Culture Documents
You want to create a cursor that can be used several times in a block. Selecting a
different active set each time that it is opened. Which type of cursor do you
?create
A cursor FOR loop 1
A multiple selection cursor. 2
A cursor for each active set. 3
A cursor that uses parameters. 4
You want to retrieve the employee details from the emp table and process them in
PL/SQL block. Which type of variable do you create in the PL/SQL block to
retrieve all the rows and columns using a single select statement from the emp
?table
PL/SQL record. 1
%ROWTYPE variable. 2
PL/SQL table of scalars. 3
PL/SQL table of records. 4
You want to display the average salary for the departments 20 and 50 but only if
those departments have an average salary of at least 2000. Which statement will
?produce the required results
SELECT deptno, AVG(sal) 1
FROM emp
GROUP BY deptno
HAVING AVG (sal)>=2000;
Deptno IN (20,50);
SELECT deptno, AVG(sal) 2
FROM emp
WHERE depno IN(20,50)
GROUP BY deptno
HAVING AVG (sal)>=2000;
SELECT deptno, AVG(sal) 3
FROM emp
WHERE deptno IN (20,50)
AND AVG (sal)>=2000
GROUP BY deptno;
1
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
2
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
3
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
4
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
5
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
6
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
Declare
fvar number := null; svar number := 5
Begin
<<>>goto
if fvar is null then
<<>>
svar := svar + 5
;end if
;End
?What will be the value of svar after the execution
Error 1
10 2
5 3
None of the above 4
Which of the following is NOT VALID is PL/SQL
Bool boolean; 1
NUM1, NUM2 number; 2
deptname dept.dname%type; 3
date1 date := sysdate 4
A Transaction ends
Only when it is Committed 1
Only when it is Rolledback 2
When it is Committed or Rolledback 3
None of the above 4
A Stored Procedure is a
Sequence of SQL or PL/SQL statements to perform specific function 1
Stored in compiled form in the database 2
Can be called from all client environmets 3
All of the above 4
?Which of the following is not correct about a View
To protect some of the columns of a table from other users 1
Ocuupies data storage space 2
To hide complexity of a query 3
To hide complexity of a calculations 4
7
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
8
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
9
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
Natural join 2
Outer join 3
All of the above. 4
?Which of the following is true concerning a procedure
You do not create them with SQL. 1
They do not need to have a unique name. 2
They include procedural and SQL statements. 3
They are the same thing as a function. 4
?A CASE SQL statement is which of the following
A way to establish a loop in SQL. 1
A way to establish an IF-THEN-ELSE in SQL. 2
A way to establish a data definition in SQL. 3
All of the above. 4
?Which of the following is one of the basic approaches for joining tables
Subqueries 1
Union Join 2
Natural join 3
All of the above 4
?A UNION query is which of the following
Combines the output from no more than two queries and must include the same 1
number of columns.
Combines the output from no more than two queries and does not include the same 2
number of columns.
Combines the output from multiple queries and must include the same number of 3
columns.
Combines the output from multiple queries and does not include the same number 4
of columns.
The following SQL is which type of join: SELECT CUSTOMER_T. CUSTOMER_ID,
;ORDER_T. CUSTOMER_ID, NAME, ORDER_ID FROM CUSTOMER_T,ORDER_T
Equi-join 1
Natural join 2
Outer join 3
Cartesian join 4
?Which of the following is true concerning triggers
10
PALESTINIAN NATIONAL AUTHORITY الســــلطة الوطنـيـة الفلسـطينيـة
GENERAL PERSONNEL COUNCIL ديـــوان الموظفـيــــــن العـــــــام
2014/03/06
مبرمج قواعد البيانات: نموذج امتحان لوظيفة
13