Вы находитесь на странице: 1из 2

1. Which of the following a. By default it sorts in b. By default it sorts in 2. Which one is an object a. create index. b.create grant 3. a. b. c. d.

one is true about order by clause? ascending order. descending order. privilege?

Which of the following are true? Single-row functions can be used only in select and where clause. character functions works on character data type column only. date functions return date data type only. None of the above

4. What does the following query does? Select a.mid, b.maxsal from EMP a, (select mid, max (sal) maxsal from EMP group by deptname) b where a.mid=b.mid; a. b. c. d. maximum salaried emp within each dept. maximum salaried emp within company. Error in statement. I don t remember

5) Which is true about FOR loop in cursor? a. No need to mention about EXIT condition b.No need to give Declare keyword. 6). Which is not a cursor method? a. %Notfound. b. %found c. %rowcount d. %many rows 7). Calculate 12*sal*commission for every record of the EMP table choose the app ropriate query? a. Select 12*sal*nvl (commission, 0) from EMP; b. Select 12*sal*decode (commission, 0) from EMP; 8)16. Select empname, empsal [Where, having, etc.]. 9) 17. State the Correct one: a. Group by should be placed b. Group by should be placed c. Order by should be placed from EMP _______ sal>20000

before having clause after having clause before select clause

8. What will be situation when raise_ exception is raised and exception handler block is not provided? a. it will cause a memory leak b. it will raise % not found error c. the control will pass through sql block 9. Not true about Cursor for Loop? a. Open cursor b. Close cursor c. Fetch cursor d. All of the above 10)a. CREATE TABLE EMP (Empno NUMBER (4), Ename VARCNAR2 (35), Deptno NUMBER (7, 2)

CONSTRAINT emp_deptno_fk REFERENCES dept (deptno) 11. View is created with: a. By joining two tables b. Some restrictions on row in one table. 12. What is output of full outer join? a. only matched columns in both the tables b. unmatched columns as well in both the tables c. matched column in one table and unmatched in the other 13. Result for round (trunc (mod (1600, 10),-1), 2)? a. 0 b. error c. 1 d. none 14) What is true about GROUP BY clause? a. It has to be used before HAVING clause b. It has to be used after HAVING clause c. Last in select statement. d. None 15)Decode ("1611", aaaa, 1444, exists, non existent) what will the output be if the column has the value 1444? a. Exists b.non existent 16). If you want the data type of a column existing in some other table what wil l you use? a. %Rowtype b.%found 17) Create table dept (....); Rollback; Desc dept; a. Commit should have been present instead of rollback to describe table dept. b. Structure of table dept will appear because create is DDL command so it get a utomatically committed. 18). What is equivalent to If-Then-Else stmt? 19)What is true about implicit cursor? a. You should be careful while using implicit cursors. b. Implicit cursor is user in for all loops. c. Implicit cursors are used for SQL statements. 20). To search for the employees whose last name has a as its second letter.

Вам также может понравиться