Examine the following block of code:
Which two statements are correct about the code above? (Choose two.)
A.
The function goes through only the parse and executes phases.
B.
The function goes through the parse, bind, and execute phases.
C.
The function goes through the parse, bind, execute, and fetch phases.
D.
All the processing phases for the function are performed only at run time.
E.
Only the EXECUTE IMMEDIATE statement inside the function is parsed at run time.
A E
A, E
http://docs.oracle.com/cd/B28359_01/appdev.111/b28424/adfns_sqlproc.htm#BEJDDEHE
DDL Statement Processing
The execution of DDL statements differs from the execution of DML statements and queries, because the success of a DDL statement requires write access to the data dictionary. For these statements, parsing (Stage 2) actually includes parsing, data dictionary lookup, and execution.
‘Delete from’ is DML. Not a DDL.
But “CREATE FUNCTION” is DDL. And the question (Which two statements are correct about the code above) includes the whole code, at least creation new ddl object in DB.
During the parse call, Oracle Database:
•Checks the statement for syntactic and semantic validity.
•Determines whether the process issuing the statement has privileges to run it.
•Allocates a private SQL area for the statement.
if we don’t parse code we are able to create function with non existing tables and etc.
b , e
D,E
A E
A,E
AE
B and E
Answers are confusing, can some one help me which one is the correct answer…
THanks,
usually posts some extremely fascinating stuff like this. If you are new to this site
although sites we backlink to beneath are considerably not related to ours, we feel they may be in fact worth a go via, so have a look
Here are several of the web-sites we advise for our visitors
Every after inside a when we choose blogs that we read. Listed beneath are the newest websites that we pick out
Usually posts some really fascinating stuff like this. If youre new to this site.
we like to honor many other world-wide-web web pages on the web, even when they arent linked to us, by linking to them. Below are some webpages worth checking out
The data mentioned within the write-up are several of the most effective readily available
very few web-sites that come about to be detailed beneath, from our point of view are undoubtedly nicely worth checking out
always a large fan of linking to bloggers that I adore but really don’t get a great deal of link love from
Sould be AE or DE? Im a bit confused
???
AE
http://vicentenzpmgmlnq.canalblog.com/archives/2017/01/22/34837931.html
I am thinking AE.
A –> because p_empno is a regular plsql variable, not bind variable, and plsql itself resolves the value of the variable before passing it to SQL engine. So the SQL that will be parsed at run time would be (e.g.): DELETE FROM emp WHERE empno = 100.
E –> because EXECUTE IMMEDIATE is parsed at run the per oracle documentation.
I think
A – Right: There is no bind (see below)
B – Wrong: There is no bind as the literal string is composed and sent i.e ‘Delete from emp where empno = 100’ – no variable sent to be parsed
C – Wrong: There is no bind and no fetch, statement is a delete.
D – Wrong: Tricky, but the function is not parsed at run time. When it is created it is parsed and the parsed version stored in the dictionary.
E – Right: Again due to D, and execute immediate being dynamic