1. what is the difference between database trigger and application trigger? ans



Download 96.58 Kb.
Date28.05.2018
Size96.58 Kb.
#50894


1. what is the difference between database trigger and application trigger?
ans: Database triggers are backend triggeres and perform as any event occurs on databse level (ex. Inset,update,Delete e.t.c) whereas application triggers are frontend triggers and perform as any event taken on application level (Ex. Button Pressed, New Form Instance e.t.c)

2. what are the file utilit comands used in PL/SQL procedures?



ANS: Wrap utility or DBMS_DDL.


3.
what is a cluster and what is the real time use and business reasons to use Clustering

Ans: Clustering is a method of storing tables that are intimately related and often joined together into the same area on disk. For example, instead of the BOOKSHELF table being in one section of the disk and the BOOKSHELF_AUTHOR table being somewhere else, their rows could be interleaved together in a single area, called a cluster. The cluster key is the column or columns by which the tables are usually joined in a query (for example, Title for the BOOKSHELF and

BOOKSHELF_AUTHOR tables).


Cluster are groups of one or more tables physically stores together to share common columns and are often used together



4. In PL/SQL if we write select statement with INTO clause it may return two exceptions NO_DATA_FOUND or TOO_MANY_ROW . To do you avoid these execeptions. How do you write SQL statement in alternative way?

Ans: There is no solution for NO_DATA_FOUND else you handle it using Exception block as i 

do above...

well TOO_MANY_ROWS is programming fault, when 
your select query

uses "=" operator then may be there is Too_many_rows exception, to avoid this

always use "IN" operator in u r select Query.

i.e 

select empno, ename into eid, enam from emp

where deptno IN (select deptno from emp where sal>3000);


5. what is dense_rank function and it's usage ?

6. What is HIGH WATERMARK?I got to know that it is reset when the TRUNCATE command is executed on a table.


ans: HWM is the upper boundary of the storage area of a table. when TRUNCATE is used on the table, all the rows of that table is deleted and the HWM is decreased to the minimum size. But when DELETE is issued on the table, the rows are deleted and nothing is done on the HWM. Thats is, the HWM is never decreased even after the no of rows for the table is less or none. Thats is this keeps some space always with its own.

Whats the other reated issue on this?.... when your query perform full table scan on the table on which the DELETE is done, the query will scan the disk space till the HWM ( even if there is no row ) which will result in bad response time.... But if TRUNCATE is used, the HWM willl be reset and the query will take less time...



7. explian rowid,rownum?what are the psoducolumns we have?



ANS: rowid is hexadecimal format which is parmently stored with row
rownum while retreivng data oracle attach row num for each row.
Ex:rowid,rowno,currval,nextval,sysdate,uid,level,CoNNECT_BY_ISCYCLE,CONNECT_BY_ISLEAF.
8. 1)what is the starting "oracle error number"?2)what is meant by forward declaration in functions?


ANS:

ORA-00000:

normal, successful completion

Cause:

Normal exit.

 Forward Declaration means.. If you are defining a package body having two procedures , If u want to use second procedure in the defination of first procedure.. You have to declare the second package with its arguments(if have)  before using in the defination of first procedure.. its labled as forward declaration..

9. what is the difference between database server and data dictionary



ANS: Database server is  base on which everything resides,It Contains all the schemas,triggers,views etc..

Data Dictionary contains meta data information about each and every schemas object like tables procedures..etc




10. Hi,Can anyone tell me the difference between instead of trigger, database trigger, and schema trigger?Thanks.


ANS:
Instead of trigger : A view cannot be updated , so if the user tries to update a view, then this trigger can be used , where we can write the code so that the data will be updated in the table, from which the view was created. Database trigger : this trigger will be fired when a database event ( dml operation ) occurs in the database table, like insert , update or delete. System triggers : this trigger will fire for database events like dtartup / shutdown of the server, logon / logoff of the user, and server errors ... and also for the ddl events, like alter, drop, truncate etc.

11. what is difference b/w stored procedures and application procedures,stored function and application function..



ANS: The difference between the two can be categorised via: Stored subprograms ans Application subprograms
1) Stored subprograms: These are coded and compiled from within the Oracle database via SQL Plus etc.
2) Application subprograms: These are coded and compiled from within the Oracle development tools such as Oracle Developer.

12. State the difference between implict and explict cursor's


13. what is pragma? can any one give me the example of autonomous Transaction ?can we change the order of procedure parameter while calling procedure?



ANS: Pragama is compile directive .

Example of Autonomous transactions

   Suppose you are updating value from table and you don't have update trigger on that table

but still you want to maintain a log entry for this update in seprate table.

  You can write a procedure and call that procedure to do this . But you can not use COMMIT in this called procedure  because it will save the entire transaction.

  To avoid this you can delclare this procedure as autonomous transaction procedure so that theexecution of this procedure will be treated as totally diff. transaction and you can issue  commit in called procedure without affecting the main transaction.




14. What is the data type of Null?
ANS:
In Tech Speack, NULL is a age old concept of nothing. This is not true in case of oracle. Oracle treats NULL as character value of length of 0.

So, the default data type of NULL is a character data type and to prove it, we create a view on a null column with an alias a, and then describe it to see the datatype and length of the string. Here is the code.....

create view myview
as
select null a from dual;

describe myview;
The describe command shows that the column a has a data type of a varchar2(0).
So the Answer is : Character Type

15. What is autonomous Transaction? Where are they used?


16. Details about FORCE VIEW why and we can use


ANS:
we create force view when we are not sure about the table name. In otherwords force views can be created on a table or view which doesn't exists in the database.

17. How can one view all the procedures,functions,triggers and packages created by the user


ANS:

select object_name, object_type from user_objects

where object_type in ('PACKAGE','PROCEDURE','FUNCTION','TRIGGER')


18. What is the difference between User-level, Statement-level and System-level Rollback? Can you please give me example of each?
ANS:


1. System - level or transaction level
   Rollback the current transaction entirely on errors. This was the unique
   behavior of old drivers becauase PG has no savepoint functionality until
   8.0.

2. Statement
   Rollback the current (ODBC) statement on errors (in case of 8.0 or later
   version servers). The driver calls a SAVEPOINT command just before starting
   each (ODBC) statement and automatically ROLLBACK to the savepoint on errors
   or RELEASE it on success. If you expect Oracle-like automatic per statement
   rollback, please use this level.

3. User Level
   You can(have to) call some SAVEPOINT commands and rollback to a savepoint
   on errors by yourself. Please note you have to rollback the current
   transcation or ROLLBACK to a savepoint on errors (by yourself) to continue

19. What happens when DML Statement fails?A.User level rollbackB.Statement Level RollbackC.Sustem Level Rollback


20. Why Functions are used in oracle ?Can Functions Return more than 1 values?Why Procedures are used in oracle ?What are the Disadvantages of packages?What are the Global Variables in Packages?



ANS: 1) A function will return a value, adding to that , it is possible to use a function in SQL statements, whereas procedures cannot be used.2)No, functions cannot retrun more than one value, instead one can get this done in other way round by using OUT parameters for a function.3)To perform validations and transactions on database tables.4)Memory usage is more.5)The variable defined inside Package Specification are treated as Global variables, which can be referred externally.


21. Is there any limitation on no. of triggers that can be created on a table?


ANS: only 12 triggers could be associated with a given table, but in higher versions of Oracle there is no such limitation,By using When Condition.
22. what is p-code and sourcecode ?
ANS:


Source code: The code say a PLSQL block that the user types for the exection

P-Code: The source code after -Syntax check, Parse tree generation, Symantic check, and further execution of the parse tree..giving the final P-code ready for data fetch or manipulation ...
23. What are ref cursors ?
ANS:

24. Which type of binding does PL/SQL use?

ANS: Before a PL/SQL program can be executed, it must be compiled. The PL/SQL compiler resolves references to Oracle objects by looking up their definitions in the data dictionary. Then, the compiler assigns storage addresses to program variables that will hold Oracle data so that Oracle can look up the addresses at run time. This process is called binding
How a database language implements binding affects runtime efficiency and flexibility. Binding at compile time, called static or early binding, increases efficiency because the definitions of database objects are looked up then, not at run time. On the other hand, binding at run time, called dynamicor late binding, increases flexibility because the definitions of database objects can remain unknown until then.


25. Talk about "Exception Handling" in PL/SQL?


26. What are the return values of functions SQLCODE and SQLERRM ?


ANS:
SQLCODE returns the latest code of the error that has occurred.SQLERRM returns the relevant error message of the SQLCODE.

27. What are advantages fo Stored Procedures / Extensibility,Modularity, Reusability,&


What are advantages fo Stored Procedures / Extensibility,Modularity, Reusability, Maintainability and one time compilation.
28. What are two parts of package ?


ans: The two parts of package are PACKAGE SPECIFICATION & PACKAGE BODY. Package Specification contains declarations that are global to the packages and local to the schema.Package  Body  contains  actual  procedures  and  local  declaration of the procedures and cursor declarations.


29. What is Overloading of procedures ?


ANS: TheSame procedure name is repeated with parameters of different datatypes and parameters in different positions, varying number of parameters is called overloading of procedures.


30. What are the modes of parameters that can be passed to a procedure ?
31. What is difference between a PROCEDURE & FUNCTION ?
ANS:


1. Function is mainly used in the case where it must return a value. Where as a procedure may or may not return a value or may return more than one value using the OUT parameter.
 
2. Function can be called from SQL statements where as procedure can not be called from the sql statements 

3. Functions are normally used for computations where as procedures are normally used for executing business logic. 

4. You can have DML (insert,update, delete) statements in a function. But, you cannot call such a function in a SQL query.

5. Function returns 1 value only. Procedure can return multiple values (max 1024). 

6.Stored Procedure: supports deferred name resolution. Example while writing a stored procedure that uses table named tabl1 and tabl2 etc..but actually not exists in database is allowed only in during creation but runtime throws error Function wont support deferred name resolution. 

7.Stored procedure returns always integer value by default zero. where as function return type could be scalar or table or table values

8. Stored procedure is precompiled execution plan where as functions are not.
 
9.A procedure may modify an object where a function can only return a value The RETURN statement immediately completes the execution of a subprogram and returns control to the caller. 

32. What is a stored procedure ?


ANS:


A stored procedure is a group of SQL statements that form a logical unit and perform a particular task, and they are used to encapsulate a set of operations or queries to execute on a database server.

33. Where the Pre_defined_exceptions are stored ?



ANS:

 In the standard package. Procedures, Functions & Packages ;



34. What is Raise_application_error ?



ANS:

You can use this procedure to issue user-defined error messages from stored subprograms.
You can report errors to your application and avoid returning unhandled exceptions.
Syntax: raise_application_error (error_number,message[, {TRUE | FALSE}]);

35. What is Pragma EXECPTION_INIT ? Explain the usage ?


ANS:

PRAGMA EXCEPTION_INIT statement associate the declared exception with the standard Oracle server error number. PRAGMA EXCEPTION_INIT tells the compiler to associate an exception name with an Oracle error number. That allows you to refer to any internal exception by name and to write a specific handler for it.



PRAGMA (also called pseudoinstructions) is the keyword that signifies that the statement is a compiler directive, which is not processed when the PL/SQL block is executed. Rather, it directs the PL/SQL compiler to interpret all occurrences of the exception name within the block as the associated Oracle server error number.

36. Is it possible to use Transaction control Statements such a ROLLBACK or COMMIT in Database Trigger ? Why ?



ANS:

Generally In triggers you can't use TCL commands.  
But you can use TCL commands in Autonomous Triggers.  
You can declare a trigger as Autonomous by providing PRAGMA AUTONOMOUS_TRANSACTION in the beginning of the trigger. 
At a same time you have to end your trigger with commit/rollback. 
You can use these type of triggers to maintain log details of a table. 

37. Explain the usage of WHERE CURRENT OF clause in cursors ?



ANS:

 WHERE  CURRENT OF clause in an UPDATE,DELETE statement refers to the latest row fetched from a cursor

38. What is a cursor for loop ?



ANS:

The cursor FOR LOOP statement implicitly declares its loop index as a record variable of the row type that a specified cursor returns, and then opens a cursor. With each iteration, the cursor FOR LOOP statement fetches a row from the result set into the record.




39. What is nested table in Oracle and and difference between table and nested table


ANS:

A nested table can be stored as a database column. This means that the entire nested table is contained in one row of a table and each row of the table can contain different nested table.


40. What are the components of a PL/SQL block ?


ANS;

PL/SQL Block contains :



Declare : optional

Variable declaration



Begin  : Manadatory

Procedural statements.



Exception : Optional

any errors to be trapped



End :  Mandatory

So only begin and end keywords are required, as needed, to process a pl/sql block.




41. What do you mean by OCI, Data guard and Advance queue responsibilities for a Oracle developers?


ANS:

OCI stands for Oracle Call Interface, it is a interface api used to access oracle database from C programs. Data Guard stands for it is multiple DB servers enviornment configured for Physical as well as Logical Standby Databases. And Oracle Advance Queueing provides interfaceing/messing mechanisam between oracle and non- oracle systems.

42. How do you encrypt the function to prevent accessing from users without specific permission. ?



ANS:

I think you can use wrap utility encrypt the function / procedure program units

for example create a function store it as xx.sql file

c:oracle> wrap iname=xx.sql

This process will result xx.plb file which is encrypted

43. HI,What is Flashback query in Oracle9i...?



ANS:

Flahsback is used to take your database at old state like a system restore in windows. No DDL and DML is allowed when database is in flashback condition.

user should have execute permission on dbms_flashback package

for example:

at 1030 am

from scott user : delete from emp;

commit;

at 1040 am I want all my data from emp table then ?



  declare
  cursor c1 is select * from emp;
  emp_cur emp%rowtype;
   begin
   dbms_flashback.enable_at_time(sysdate - 15/1440);
   open c1;
   dbms_flashback.disable;
   loop
  fetch c1 into emp_cur;
 exit when c1%notfound;
  insert into emp values(emp_cur.empno, emp_cur.ename, emp_cur.job, 
  emp_cur.mgr,emp_cur.hiredate, emp_cur.sal, emp_cur.comm,
  emp_cur.deptno);
  end loop;

commit;
 end;




44. Oracle refcursor and procedure

45. Convert SQL to Oracle Procedure using cursor


46. I want to insert the following information in userAction table:Which user execute which query on which date?the userAction table contains the foolowing attributes:USER DATE QUERYplease write to me how to resolve this problem?


47. what are purity rules for functions? why they use ? what effects if not follow these rules?



ANS:

The  purity level defines  what structure the  function reads  or  modifies.
the  types  of  purity level:

1)wnds--write  no database  stage  I.e  the  function  does not modify any database  or tables.
2)rnds--reads  no database state.  i.e function does not  read  any database  tables.
3)wnps--write  no package  state  i.efunction does not modify any packaged variables.
4)rnps-read  no package  state i.e function does not  read  any  package variables.

48. In function and procedure the parameter pass is "call by value" or "call by referenc


In function and procedure the parameter pass is "call by value" or "call by reference"?

49. What can be the Maximum size of a plsql block?


ANS:

Currently, the maximum parsed/compiled size of a PL/SQL block is 64K and the maximum code size is 100K.

We can run the following select statement to query the size of an existing package or procedure. SQL> select * from dba_object_size where name = 'procedure_name'


50. Compare EXISTS and IN Usage with advantages and disadvantages.
51. Which two statements are true?A. A function must return a value.B. A procedure must return a value.C. A function executes a PL/SQL statement.D. A function is invoked as part of an expression.E. A procedure must have a return Data

52. Oracle extract records from temporary table



Ans:

Create Global temporary tables and say on commit preserve rows. The global temporary tables have data available till the session is active. So you if you insert it at one procedure and want to access it somewhere else you can do that very easily till the session is active


53. Pragma Init Exception

54. What are the disadvantages of Packages and triggers??



Ans:

Disadvantages of Triggers 
  
 It is easy to view table relationships , constraints, indexes, 
stored procedure in database but triggers are difficult to view. 
   Triggers execute invisible to client-application. They are 
not visible or can be traced in debugging code. 
   It is hard to follow their logic as it they can be fired 
before or after the database insert/update happens. 
   It is easy to forget about triggers and if there is no 
documentation it will be difficult to figure out for new developers for their 
existence. 
   Triggers run every time when the database fields are updated 
and it is overhead on system. It makes system run slower.

Disadvantage of packages: 
  
 Unnecessary module loading.
   Unable to load large packages into memory.
   Unable to compile large packages.
   Lack of synonym support.
   No version control.


55. Hi, How do we display the column values of a table using cursors without knowing the column names inside the loop?

56. What will happen after commit statement ?


57. What is PL/SQL ?


58. 1.How to display current Date & Time in Pl/Sql2.How to use DML in Procedure?


59. How do you call procedure have a DDL or commit/rollback statement from a trigger?


60. Oracle Cursor types


61. Suppose I have 2 triggers on table T, tr1- a before insert trigger & tr2- a before update trigger.tr1 has update (T) statement inside body of tr1andtr2 has insert (T) statement inside body of tr2Now, I'm tring to insert a row into T.What will hppn??

62. What is difference between a Cursor declared in a procedure and Cursor declared in a package specification ?


63. what is diffrence between IS and AS in procedure?


64. Hi Friends!! Can anybody answer what are the constraints on Mutating tables? How to remove the mutating errors in triggers?


65. What are mutating tables?


66. Write sample code that can create a hierachical set of data without using a start with and connect by clause in PL/SQL

67. how can i import .dmp file in lower version of oracle from higher version ?


68. how can i get set identity for last coloumn of the table.

69. What is the basic structure of PL/SQL ?


70. you have compiled some PL/SQL packages in your schema, and found aome errors in one procedure.how do you find which procedure produced the error?how do you find which section of the code produced the error and look at?


71. char(20) = 'name' varchar2(20)='name' When comparing these two values, are
char(20) = 'name' varchar2(20)='name' When comparing these two values, are the spaces padded in char are considered or not? Are both values equal?

72. What is the difference between right join and right outer join..


73. What is the disadvantage of out paramter in functions


74. What is the need for using function purity in pl/sql


75. What is the difference between using IS and AS while creating a procedure, function package and package body?


76. What are the restrictions on Functions ?


77. What is PL/SQL table? SNO MARK ------- ------------------1 592 403 ‘A’4 60 Write a single query to I) Sorted Marks II)First mark III) replace the mark ‘A’ with 0(zero)?


78. Without closing the cursor, If you want to open it what will happen. If error, get what is the error?


79. What are the components of a PL/SQL Block ?


80. Is it possible to use commit or rollback in exception section.


81. Why DUAL table is not visible?

82. What are the PL/SQL Statements used in cursor processing ?


83. What are % TYPE and % ROWTYPE ? What are the advantages of using these over datatypes?


84. how can we avoid duplicate rows. without using distinct command


85. can procedures have parameters

86. How to return more than one value from a function?What are the types of triggers?What are the featu


How to return more than one value from a function?What are the types of triggers?What are the features of oracle 9i

87. How can I speed up the execution of query when number of rows in the tables increased


88. 1.What is bulk collect?2.What is instead trigger3.What is the difference between Oracle table & PL/SQL table?4.What R built in Packages in Oracle?5.what is the difference between row migration & row changing?


89. what is diff between strong and weak ref cursors


90. 1)any one can tell me,suppose we have 1000 of records,ok.then we want to update only 500 records,how can we solve this problem?2)how many types of "explicit cursors" we have?


91. why do we need to create a force view?what is its purpose?give some examples?

92. What is a cursor ? Why Cursor is required ?


93. What is materialized view?


94. What happens if a procedure that updates a column of table X is called in a database trigger of the same table ?


95. What will happen to an anonymus block,if there is no statement inside the block?eg:-declarebeginend;


96. Can we have same trigger with different names for a table?eg: create trigger trig1after insert on tab1;andeg: create trigger trig2after insert on tab1;If yes,which trigger executes first.


97. difference between truncate and delete


98. What are the two parts of a procedure ?


99. How to reduce the the burden/main memory on database if i am using refcursor to hold large data to increase performance.


100. Name the tables where characteristics of Package, procedure and functions are stored ?


101. How packaged procedures and functions are called from the following?

102. Explain how procedures and functions are called in a PL/SQL block ?


103. How many types of database triggers can be specified on a table ? What are they ?


104. What will be the impact of replacing an API call with a stored PL/SQL call?


105. How PL SQL is different from T-SQL


106 > Select Count(*) from T1 where a=10 3> Select count(*) from T1 where b=20 11Now, What will b the O/P of the following..select count(*) from T1 where a=10 or b=20..............................


107. What is the purpose of FORCE while creating a VIEW


108. What is an Exception ? What are types of Exception ?


109. What is the output of the following pl/sql block ?declare v_empno emp.empno%type;begin select empno into v_empno from emp where empno = 10;exception when others then dbms_output.put_line ( 'no data found'); when no_data_found then dbms_output.put_line ( 'ther is no data found ');end;


110. Explain the two type of Cursors ?


111. What is the difference between private packages and public package . what is the difference in declaration of these 2 packages.

112. how to avoid the mutating error with sample program


113. Give the structure of the procedure ?


114. Explain about CURSOR and REF CURSUR with real time scenario where this can be used.


115.
When using a count(distinct) is it better to use a self-join or temp table to find redundant data, and provide an example?


116. How do you set table for read only access ?


117. what is the use of nocopy parameter in oracle procedure


118. What is CODEX function?


119. can we use commit in trigger and cursors?

120. Why we use instead of trigger. what is the basic structure of the instead of trigger. Explain specific business reason of it's use


121. how to create a constraint for a tablecolumn which is already created

122. How to disable a trigger for a particular table ?


123. Force View


124. How do you debug the PL/SQL ?


125. What is mutatinig trigger? How do you avoid mutating trigger?


126. What is a purity level? How it is should be taken into consideration when your writing any database objects i.e., trigger,function, procedure etc.,


127. how to trace the errors in pl/sql block code..


128. How to get the 25th row of a table.


129. if there is an index including three columns A, B and C. And if we issue a query in which where clause uses only column B....will the index be useful??and what if the where clause only has coulmn A..will the index b useful??


130. What is difference between PL/SQL tables and arrays?


131. What is the use of NOCOPY Compiler Hint while writing PL/SQL procedures/subprograms???

132. Select from A table through cursor and update B table. If it updates successfully then insert into another table. Handled every type of exception in the code?


133. Is it possible create table in procedure or function? If Not Why?


134. what are the advantages & disadvantages of packages ?


135. What is PRAGMA RESTRICT_REFERENCES:


136. Suppose thr are 10 DMLs(insert,update,delete ) in the main section of the PL/SQL block .The exception in them is handled as a whole in the exception handling section .....The error may occur in any of this DMLs ,so how can we understand that which DML has failed ??


137. What are the advantages and disadvantages of DBMS-SQL


138. how to insert a music file into the database


139. What is Atomic transaction?


140. what is the order of execution if there is a statement level and row level trigger on a same table?

141. Explain, Is it possible to have same name for package and the procedure in that package.

142. How to trace PL/SQL Package?How to trace PL/SQL procedures?How to trace SQL statement?what is DBMS_TRACE? How to use?SET AUTOTRACE ON; ?If anyone tell me how we can use trace and create log that would be great?


143i want to tune the below query for performance issue can u please help me the query is SELECT DISTINCTA.BUSINESS_UNIT,A.CUST_ID,A.ASOF_DTFROM PS_ITEM_ACTIVITY A WHERE A.BUSINESS_UNIT = '1100G'AND A.ITEM LIKE 'OA%' AND A.PO_LINE = 0AND A.ENTRY_REASON 'CLEAR'AND A.ASOF_DT > '01-JAN-1900'AND A.USER1 = ' 'UNIONSELECT DISTINCTA.BUSINESS_UNIT,A.CUST_ID,A.ASOF_DTFROM PS_PENDING_ITEM A WHERE A.BUSINESS_UNIT = '1100G'AND A.ITEM LIKE 'OA%&


144. HiWhile creating a table, what is the difference between VARCHAR2(80) and VARCHAR2(80 BYTE)?


145. How can i see the time of execution of a sql statement?


146. what happens when commit is given in executable section and an error occurs ?please tell me what happens if exception block is committed at the last?


147. What are the Limitations of Packages,views,procedures?What is the maximum number of subprograms inside a package?


148. what is difference between varray and nested table.can u explain in brief and clear my these concepts.also give a small and sweet example of both these.


149. Wheather a Cursor is a Pointer or Reference?


150. How to find the nth hightest record holder from a table


151. What is the difference between In, Out, InOut Parameters. Can we pass value or reference or both to the In Out Parameter.

152. What is a NOCOPY parameter? Where it is used?


153. What is PL/SQL table ?


155. Can we create a table using with Procedure or Function?wat is the Mutating trigger error?


156. Can e truncate some of the rows from the table instead of truncating the full table.


157. What are the Restrictions on Cursor Variables?Thanks Ramki, Hyd, TCS


158. How to change owner of a table?


159. Mention the differences between aggregate functions and analytical functions clearly with examples?


160. how can u create session variable in pakages?


161. How can I create a new table by using other two table's values.

162. what is the diff between %Rowtype and %type?


163. what is the difference between database trigger and schema trigger?


164. How to avoid using cursors? What to use instead of cursor and in what cases to do so?


165. How to disable multiple triggers of a table at at a time?

166 What will the Output for this Coding> Declare Cursor c1 is select * from emp FORUPDATE; Z c1%rowtype;Begin Open C1;Fetch c1 into Z;Commit;Fetch c1 in to Z;end;


167. Can we use commit or rollback command in the exception part of PL/SQL block?

168. Suppose, I've created a new database DB1 n i've created a table DB1.T1.Now, DESC T1 --> d
Suppose, I've created a new database DB1 n i've created a table DB1.T1.Now, DESC T1 --> desplaying the table structure butselect * from DB1.T1 ---->giving--> table or view does not exist.. Can any one explain possible reason behind this.

169. What are the datatypes a available in PL/SQL ?


170. can i change the elements of listitems at runtimes?


171. Give the structure of the function ?

172. pls send the interview qustions from pl/sql, sql, datawarehousing questions.


173. What is the difference between a reference cursor and normal cursor ?


174. How to view the contents of tables created by the following procedure after the Loop?CREATE OR REPLACE PROCEDURE A0_BULK_COLLECT_TEST IS TYPE EMPLOYEE_MRNO IS TABLE OF A_REGISTRATION_HEADER.ARH_MR_NUM%TYPE; TYPE EMPLOYEE_NAME IS TABLE OF VARCHAR2(255); MRNUMBERS EMPLOYEE_MRNO; NAMES EMPLOYEE_NAME; CURSOR crBulkCollect IS SELECT ARH_MR_NUM, ARH_FIRST_NAME||' '||ARH_MIDDLE_NAME||' '||ARH_LAST_NAME FROM A_REGISTRATION_HEADER WHERE ARH_CTGRY_CD='EMP';BEGIN


175. what is difference between Cursor and Ref Cursor. Please give example.


176. State the advatage and disadvantage of Cursor's


177. can we declare a column having number data type and its scale is larger than pricesionex: column_name NUMBER(10,100), column_name NUMBAER(10,-84)


178. what is datatype of x when we say define x in oracle


179. How we can create a table in PL/SQL block. insert records into it??? is it possible by some procedure or function?? please give example...


180. Can any one explain Perforance Tuning in PL/SQL


181. How to display the contents of a current record fetched in a ref cursor

182. How to handle exception in Bulk collector?


183. What is the DATATYPE of PRIMARY KEY?is it Binary integer..i'm not sure..1.Varchar22.Char3.Binary integer4.Number


184. In a Distributed Database System Can we execute two queries simultaneously ? Justify ?


185. #1 What are the advantages and disadvantages of using PL/SQL or JAVA as the primary programming tool for database automation.#2 Will JAVA replace PL/SQL?


186. Write the order of precedence for validation of a column in a table ?


187. 1) Why it is recommonded to use INOUT instead of OUT parameter type in a procedure?2) What happen if we will not assign anything in OUT parameter type in a procedure?


188. What is Mutation of a trigger? why and when does it oocur?


189. can anybody tell me a sample OCI function which will be able to call from Tourbo cthanx!!


190. we have a trigger on data base.in the trigger body we have created a body using dbms_output.put_line(********) ;this should be firedwhen ever trigger executed;


191. What is PL/Sql tables?Is cursor variable store in PL/SQL table?

192. What type of binding is PL/SQL?


193. What steps should a programmer should follow for better tunning of the PL/SQL blocks?Difference between procedure and function?What is the use of ref cursor return type?


194. Based on what conditions can we decide whether to use a table or a view or a materialized view ?


195. What is Data Concarency and Consistency?


196. What is bulk binding please explain me in brief ?


197. What is the difference between all_ and user_ tables ?


198. what is crosstab


199. can i write plsql block inside expection


200. What is a database trigger ? Name some usages of database trigger ? Subscribe


Database trigger is stored PL/SQL program unit associated with a specific database table. Usages are Audit data modifications,&n
201. Describe in brief some of the featurs of oracle9i.What is LogMiner?

202. What happens when a package is initialized ?


203. What are the cursor attributes used in PL/SQL ?


204. What is difference between % ROWTYPE and TYPE RECORD ?


205. What are two virtual tables available during database trigger execution ?

 

Read more: http://knowledgestuff-com.webnode.in/products/oracle-pl-sql-interview-questions/





Download 96.58 Kb.

Share with your friends:




The database is protected by copyright ©ininet.org 2024
send message

    Main page