Home » Other » Training & Certification » Oracle D2K, SQL*Plus, PL/SQL interview questions - please answer
Oracle D2K, SQL*Plus, PL/SQL interview questions - please answer [message #116297] |
Tue, 19 April 2005 05:27 ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
vgs2005
Messages: 123 Registered: April 2005
|
Senior Member |
|
|
hi,
I used to work using Oracle D2K and PL/SQL. Now, I'm currently not in job and about to have an interview. Unfortunately, I don't have an Oracle installed in my PC to answer my questions below in preparation for my interview. Some of these were actually asked in some interviews. Please help.
1. What should be compiled first? The package specs or the package body?
2. If a procedure is defined in the package specs has no 'body' in the package body, what happens when I compile the package specs or vice-versa?
3. If a procedure body is found in the package body but has no definition in the package specs, what happens when I compile the package body or vice-versa?
4. What is the advantage of using packages over using scattered procedures/functions?
5. What takes place when a SELECT statement is executed in SQL*Plus? (like in the background)
6. What is the advantage of using Cursors instead of plain For loops?
7. How do I pass a parameter when calling or opening a form module? (This is a D2K question)
thanks in advance.. I would also appreciate if you can send some PL/SQL or SQL interview questions or any links to the same..
vgs
|
|
|
Re: Oracle D2K, SQL*Plus, PL/SQL interview questions - please answer [message #116308 is a reply to message #116297] |
Tue, 19 April 2005 06:21 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) ![Go to next message Go to next message](/forum/theme/orafaq/images/down.png) |
![](http://www.orafaq.com/forum/images/custom_avatars/43055.jpg) |
Maaher
Messages: 7065 Registered: December 2001
|
Senior Member |
|
|
1. The Spec:
If it doesn't exist, you'll receive
PLS-00304: cannot compile body of 'YOURPACKAGE' without its specification when you try to compile a body alone.
If the Spec hasn't changed, you can compile the body alone.
2. All procedures defined in the specification have their body in the package body. They have to correspond. Else you'll receive an error when you compile the body. You can define private procedures, however. Those are only defined in the body. They cannot be called from outside the package.
3. See 2.
4. Search the board (hint: dependency chain, maintainability, information hiding, wrapper...).
5. http://www.lc.leidenuniv.nl/awcourse/oracle/server.920/a96533/optimops.htm#30169
6. Huh?
7. You have worked with Developer Suite and you don't know this one? Strange...
anyway, from Forms Help:PROCEDURE OPEN_FORM
(form_name VARCHAR2,
activate_mode NUMBER,
session_mode NUMBER,
paramlist_name VARCHAR2);
PROCEDURE OPEN_FORM
(form_name VARCHAR2,
activate_mode NUMBER,
session_mode NUMBER,
paramlist_id PARAMLIST);
PROCEDURE OPEN_FORM
(form_name VARCHAR2,
activate_mode NUMBER,
session_mode NUMBER,
data_mode NUMBER,
paramlist_name VARCHAR2);
PROCEDURE OPEN_FORM
(form_name VARCHAR2,
activate_mode NUMBER,
session_mode NUMBER,
data_mode NUMBER,
paramlist_id PARAMLIST);
In the called form, define the parameter
In the calling form, build a parameter list and pass it.
Other options are:
- package variables
- :GLOBAL variables
MHE
|
|
|
Re: Oracle D2K, SQL*Plus, PL/SQL interview questions - please answer [message #116928 is a reply to message #116308] |
Sat, 23 April 2005 10:17 ![Go to previous message Go to previous message](/forum/theme/orafaq/images/up.png) |
vgs2005
Messages: 123 Registered: April 2005
|
Senior Member |
|
|
thanks a lot..
i understand why you find it 'strange' that I asked about the parameter passing in forms. actually, the last time I used Oracle Forms was more than 2 years ago. I forgot the syntax and all.. And now, I don't even have a Personal Oracle in my PC nor books to refer to. I'm just now relying on 'on-line' help from you, guys.. - and a bit on my memory.
thanks again..
|
|
|
Goto Forum:
Current Time: Tue Sep 10 09:34:33 CDT 2024
|