Tuesday, April 29, 2008

PL/SQL QUESTION updated

PL/SQL QUESTION updated

QUESTION : 13

IN PL/SQL BLOCK WE QUERRY THIS STATEMENT

FOR EMP_RECORD IN CURSOR_EMP LOOP EMP_RECORD:='JIM'; END LOOP; CLOSE CURSOR_EMP; WHICH TASK WILL BE ACCOMPLISHED

1.NO FETCH STATEMENTIS ISSUED. 2.THERE IS NEED TO OPEN A CURSOR. y3.THERE IS NO NEED TO CLOSE THE CURSOR. 4.THE LOOP TERMINATING CONDITION IS MISSING.


QUESTION : 14

WHICH PL/SQL BLOCK USER_DEFINED EXCEPTION RAISED ?

y1. EXCEPTION 2. EXECUTEABLE 3. DECLARATIVE 4. HEADER


QUESTION : 15

WHAT SHOULD YOU TO DO AFTER FETCH STATEMENT

1. CLOSE THE CURSOR y2. TEST TO SEE THE CURSOR ATTRIBUTE 3. OPEN THE CURSOR 4. IDANTIFY THE ACTIVE SET


QUESTION : 16

IN PL/SQL BLOCK

IF V_VALUE >100 THEN V_VALUE_INCREASE := 2*V_VALUE; IF V_VALUE >200 THEN V_VALUE_INCREASE := 3*V_VALUE; IF V_VALUE <300 THEN V_VALUE_INCREASE := 4*V_VALUE; ELSE V_VALUE_INCREASE := 4*V_VALUE;

WHICH VARIABLE V_VALUE_INCREASE ASSIGN A VALUE IF V_VALUE IS 250


1. 500 2. 750 y3. 1000 4. 1250


QUESTION : 17

EVALUATE THIS STATEMENT

SELECT UPPER(FIRST_NAME),UPPER(LAST_NAME), LENGTH(CONCAT(FIRST_NAME,LAST_NAME)) NAME FROM EMPLOYEE WHERE UPPER(LAST_NAME) LIKE '%J' OR UPPER(LAST_NAME) LIKE '%A' OR UPPER(LAST_NAME) LIKE '%N' ;

SELECT INITCAP(FIRST_NAME),INITCAP(LAST_NAME), LENGTH(FIRST_NAME) + LENGTH(LAST_NAME) FROM EMPLOYEE WHERE UPPER(SUBSTR(LAST_NAME,1,1) IN ('J','A','N');

HOW WILL THE RESULT DIFFER

y1. BOTH STATEMENT RETRIVED DIFFERENT DATA FROM THE DATABASE 2. STATEMENT 1 WILL EXECUTE AND STATEMENT 2 WILL NOT 3. STATEMENT 2 WILL EXECUTE AND STATEMENT 1 WILL NOT 4. BOTH STATEMENT RETURNS SAME DATA


QUESTION : 18

HOW MANY ELEMENT CONSISTS OF WHERE CLAUSE


1. USER_SUPPLIED LITERALS 2. ALIAS 3. COLUMN NAME 4. COMPARISION OPERATOR 5. COLUMN POSITION


QUESTION : 19

IN PL/SQL BLOCK

BEGIN FOR I IN 1..10 LOOP IF I=4 OR I=6 THEN NULL; ELSE INSERT INTO CARS(ID) VALUES(I); END IF; COMMIT; END LOOP; ROLL BACK; END;

HOW MANY VALUES WILL BE INSERTED

1. 2 2. 1 3. 5 4. 6 y5. 8 6. 10


QUESTION : 20

EVALUATE THIS STATEMENT

CREATE SYNONYUM CARS FOR ED.MARYLIN;

WHICH TASK WILL BE ACCOMPLISH?

1. SYNONYUM IS CREATED FOR ALL USER. y2. SYNONYUM IS CREATED FOR YOU. 3. SYNONYUM IS CREATED FOR ED 4. SYNONYUM IS CREATED FOR THOSE EMPLOYEES WHO HAS ACCESS THE DATABASE.

QUESTION : 21

DISPLAY ENAME,JOB AND SALARY OF ALL EMPLOYEES. ORDER OF SALARY IS DESCENDING, IF SALARY IS MATCHED THEN ORDER THE ENAME.

A. SELECT ENAME,JOB,SAL FROM EMP ORDER BY SAL,ENAME

yB. SELECT ENAME,JOB,SAL FROM EMP ORDER BY SAL DESC,ENAME

C. SELECT ENAME,JOB,SAL FROM EMP ORDER BY SAL DESC,ENAME ASCENDING

QUESTION : 22

EVALUATE THIS STATEMENT:

SELECT ENAME,JOB FROM EMP WHERE EMPNO NOT IN(SELECT MGR FROM EMP);

WHICH OPERATOR IS EQUAL TO 'NOT IN':

A. != B. NOT ALL yC. != ALL D. NOT LIKE

1. In SQL*Plus environment ,you want to store the result of your query in a text file, which command will you use; a. Spool Out. yb. Spool filename.txt. c. Spool out to filename.txt.

2. You are informed that cost of your product has by 25% and price of the product is increased by 10%. Now you have to determine the actual net profit for that product, you issued this query Select Price*1.10-Cost*1.25 from product How will this statement execute; a. This will give more result than you want yb. This will give desired result. c. This will give less result than you want.

3. Which characteristic applies to SQL. ya. When sorted in ascending order null values come in last b. When sorted in descending order null values come in last c. When sorted in ascending order null values come first

4. You have to find a name, but you don't know the case of stored data, which query will give the desired result. a. Select * from product Where ename=upper('&ename');

b. Select * from product Where ename=lower('&ename');

c. Select * from product Where upper(ename)='&ename';

yd. Select * from product Where upper(ename)=upper('&ename');

5. You have to find the name Smith. But you don't have any idea that which case user will use, which command will give the desired result. a. Select * from product Where ename=initcap('&ename');

b. Select * from product Where intioap(ename)=('&ename');


c. Select * from product Where upper(ename)='&ename';

yd. Select * from product Where ename = upper('&ename');

6. You have to find the total service period of employee in months as whole number, which query will give the result. ya. Select round(months_between(sysdata,hiredate)) from emp; b. Select round(months_between(hiredate,sysdate)) from emp;

7. If you want to join table without direct matching of their columns, which type of join will you use. a. Equi Join b. Self Join. c. Outer Join yd. Non EquiJoin.

8. Click on Exhibit Button ID Number(4) Name Varchar2(20) Manager_ID Number(4) You want to see name with their manager name which query will you use?

9. Which order is advised in SQL a. Where , Having ,Group By b. Group By, Having,Where c. Group By, Where ,Having yd. Where, Group By, Having

10. What is a nonpairwise subquery. ya. Cross Product applies to them. b. Cross product doesn't applies to them.

11. Click on Exhibit Button Table User_Tab ID Number(4) Name Varchar2(20) Hired Date You have to insert a row in this table, which query will give the desired result. ya. Insert into User_tab Values('asd',23,sysdate); b. Insert into User_tab(Name,Id,Hired) Values(123,'asd',sysdate); c. Insert into User_tab(Name,id,hired) Values('asd','123',sysdate)

12. Click on Exhibit Button Table is User_Tab Ino Number(4)

You use this PL/Sql program Begin For I in 1..5 loop Insert into user_tab Values (I); Commit; End Loop; RollBack; End; How many values will be inserted in User_tab table? a. 0. b. 1. c. 3. yd. 5.

13. To see which table you can access, which data dictionary is used. a. User_Objects. b. Dba_Ojbects. yc. All_objects.

14. To add a comment on table abc, syntax is a. Alter Table abc Add Comment b. Alter abc Add Comment. c. Commnent on abc. yd. Comment on table abc.

15. In SQL*Plus, you issued this command DELETE FROM dept WHERE DEPT_ID=30; You received an Integrity Constraint Error. What could you do to make the statement execute? a. Add the FORCE keyword to the command. b. Add the CONSTRAINTS CASCADE option to the command. c. You cannot make the command execute. yd. Delete the child record first.

16. You are updating the employee table, Jane has been granted the same privileges as you on the employee table. You ask Jane to log on to the database to check your work before you issue a COMMIT command. What can Jane do to the employee table? a. Jane can access the table and verify your changes. b. Jane cannot access the table. c. Jane can access the table, but she cannot see your changes. She can make the changes for you. yd. Jane can access the table, but she cannot see your changes and cannot make the same changes.

17. You created the patient_vu view based on id_number and last_name from the patient table. What is the best way to modify the view so that the rows can only be accessed b/w 8:00 A.M to 5:00 P.M. a. Use the ALTER command to add a WHERE clause to verify the time. b. Replace the view adding a WHERE clause. c. Drop the patient_vu and create a new view with a WHERE clause. d. Drop th epatient_vu and create a new view with a HAVING clause. ye. This task cannot be accomplished.

18. You issued this command CREATE SYNONYM e FOR ed.employee; Which task has been accomplished? a. The need to qualify an object name with its schema was eliminated for user Ed. yb. The need to qualify an object name with its schema was eliminated for only you. c. The need to qualify an object name with its schema was eliminated for all users. d. The need to qualify an object name with its schema was eliminated for users with access.


19. In the declaration section of a PL/SQL block , you create this variable; abc employee%rowtype; Which task has been accomplished? a. The abc variable was declared with the same datatype as the employee column. b. The abc table was created. c. A scalar table was created. yd. A composite variable was created based on the employee table.




ORACLE
------


section 2:

1. what is sparese matrices?. give (at least) two methods for implemetation
rather than two dimentional array.
2.what are cheap locks/latches?.
3.what is two phase locking?. Name two locks.
4. What are volatile variables in C?. What is their significance ?.
5. will these two work in same manner
#define intp int *
typedef int * inpp;
6. what are binary trees?. what is its use?.
7.

section 3 :

A). write header file containing functions used, etc (C),
problem is to maitain a Queue. user has to give size and type of Queue.
This problem is like this I don't remember exactly.
B). C++
1. What is polymorphism?
2. What is Inheritence?.
3. Mention four Object Oriented Programming Languages?>
4. Mention basic concepts of OOP.
5. What are messages in OOP?.
6. What is garbase collection?.
7.what is object?.
8. what is a class?.

section 4:
1. expand the following:
a.SEI b. ISO
2. what are different levels of SEI?.
3. What is significance of ISO?>
4. Expand the following:
a. WWW
b. HTTP
c. HTML
d. TCP/IP
5. what is Black box testing?.
6. explain the following:
1. white box testing
2. white box testing
3. boundary testing
4 stress
5. negative
6. system
7. unit
8.module
9.destructive

0 comments: