一个朋友在国外找工作的面试题目,关系生存问题,请各位大侠救一命
The following are the questions
Please try to answer following PL/SQL, SQL and database question,
*) Can we declare a column having number data type and its scale is
larger than pricesion
ex: column_name NUMBER(10,100), column_name NUMBAER(10,-84) ?
*) Explain the usage of WHERE CURRENT OF clause in cursors ?
*) What is Overloading of procedures ?
*) What is Pragma EXECPTION_INIT ? Explain the usage ?
*) What are the return values of functions SQLCODE and SQLERRM ?
*) Is it possible to use Transaction control Statements such a
ROLLBACK or COMMIT in Database Trigger ? Why ?
*) 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...
*) What are advantages for Stored Procedures?
*) PL/SQL benchmark and profile:
Two piece of PL/SQL blocks, finish the same task, can you tell which
one is better and why?
Please benchmark it on 9i and 10g both, and list the benchmark detail figures.
1.1:
ORA920> begin
2 for i in 1 .. 5000
3 loop
4 for x in ( select ename, empno, hiredate from emp )
5 loop
6 null;
7 end loop;
8 end loop;
9 end;
10 /
PL/SQL procedure successfully completed.
1.2
ORA920> declare
2 l_ename dbms_sql.varchar2_table;
3 l_empno dbms_sql.number_table;
4 l_hiredate dbms_sql.date_table;
5 begin
6 for i in 1 .. 5000
7 loop
8 select ename, empno, hiredate
9 bulk collect into l_ename, l_empno, l_hiredate
10 from emp;
11 end loop;
12 end;
13 /
PL/SQL procedure successfully completed.