Oracle database 11g program with pl sql certification




















Other items will involve questions about valid syntax or what can or cannot be performed using a package, procedure or function. Read the questions completely, examine the code carefully and look at all of the answer before making your choice.

That said, pay close attention to the time. With ninety minutes to answer eighty questions, you have less than sixty-eight seconds per question. The text on the exam says to look at the exhibit and then read the question, but I highly recommend doing the opposite. If you can answer a question without looking at a given exhibit, then you will have saved yourself some time. I doubt that many people taking the test will find themselves with lots of spare time at the end and I guarantee that a number will run out of time before they run out of questions.

Any questions left unanswered are automatically wrong. What to Expect from this Study Guide This document is built around the subject matter topics that Oracle Education has indicated will appear on the 1Z exam. This guide is designed to help you to pass the 1Z certification exam.

No book, in and of itself, is a substitute for hands-on development experience. The code is the meat of this exam. The goal of this guide is to present to you the concepts and information most likely to be the subject of test questions, and to do so in a very compact format that will allow you to read through it more than once to reinforce the information.

Additional Study Resources The companion website to this series is www. The site contains many additional resources that can be used to study for this exam and others. The website will never link to unauthorized content such as brain dumps or illegal content such as copyrighted material made available without the consent of the author.

I cannot guarantee the accuracy of the content links. While I have located the data and scanned it to ensure that it is relevant to the given exam, I did not write it and have not proofread it from a technical standpoint.

The material on the Oracle Learning Library is almost certain to be completely accurate and most of the other links come from highly popular Oracle support websites and are created by experienced Oracle professionals.

I recommend that you use more than one source of study materials whenever you are preparing for a certification. Reading information presented from multiple different viewpoints can help to give you a more complete picture of any given topic. The links on the website can help you to do this. Fully understanding the information covered in this certification is not just valuable so that getting a passing score is more likely — it will also help you in your career.

I guarantee that in the long run, any knowledge you gain while studying for this certification will provide more benefit to you than any piece of paper or line on your resume. However, SQL has no robust procedural element to allow it to apply logical processing to data retrieval or manipulation.

It provides the ability to declare variables and constants, control program flow, define subprograms, and handle runtime errors. Complex problems can be broken down into discrete subprograms, which can be reused in multiple applications.

You can execute SQL data manipulation, cursor control, and transaction control statements. It's possible to run a SQL query and process the rows of the result set one at a time. This section is optional and is used to declare variables, constants, cursors, and user-defined data types.

This section is optional. The three section keywords are not followed by a semicolon. However, the END keyword is. Anonymous blocks might also be declared in-line in an application where they should be executed.

An anonymous block is compiled each time it is loaded into memory in three stages: 1. Semantic checking -- Type checking and further processing on the parse tree. Code generation — The compiled code is created. Because they are named and available in the dictionary tables, named blocks can be invoked repeatedly. Subprograms can contain parameters, and the values of these can be different for each invocation. There are two types of subprograms: Procedures and Functions.

The primary difference between the two is that a function always returns a value when called. The other differences will be discussed in further detail later.

They can fire either on a statement level or for each row that is affected. Unless specifically coded to generate output, the most complex procedure will generate nothing except a message indicating the block completed or an error message if something goes wrong. Before output will be displayed to the console, the buffer that accepts these messages must be enabled.

It is not possible to flush the output during the execution of a procedure. If you have a procedure that contains debugging messages, but is in an endless loop -- you will never see the debugging information. Once declared, it is possible to use them wherever an expression could be used. Between the double quotation marks, any characters from the database character set are allowed except double quotation marks, new line characters, and null characters.

If a quoted user-defined identifier is a valid ordinary user-defined identifier, then the double quotation marks are optional. If the quotes are left off, then the identifier is case- insensitive.

Naming Conventions While it is possible to call variables anything at all so long as you follow the rules above , in practice it is much better to use a logical naming convention. The specific naming convention is less important than picking one convention and following it. Values that are known at the time of the declaration section and will not change should be created as constants rather than variables. In the declaration section, the variable will be given a name, a type, and depending on the data type possibly given a set storage space.

Variables created in the declaration section and not given an initial value will be NULL until assigned a value. The output of the SQL statement will become the value of the variable s. Declare and initialize variables Declaring a variable allocates storage space to hold a value, specifies the data type, and provides a name so that it can be referenced.

Variables must be declared before they can be referenced. Declarations can appear in the declarative part of any block, subprogram, or package. The name and data type of the variable is always specified during the declaration. Some data types also require a storage size, and for most data types, the declaration can also specify an initial value. The name of the variable must be a valid identifier.

It is also possible to create user-defined data types. Examples include collections and records. In addition, a constant declaration has two additional requirements. For variable assignments made in the declaration section of a block or subprogram, the initial value is assigned to the variable or constant every time the block executes.

For declarations made in a package specification, the initial value is assigned to the variable or constant once per session. The following example assigns initial values to the constants and variables that it declares. For that reason, they are sometimes referred to as host variables. Once the block has completed running, the memory associated with the variables is released and the variables are no longer accessible. Bind variables, however, continue to be accessible even after the block has completed.

It is not required that you know what that type is when making the assignment or ever for that matter. If the declaration of the referenced item changes in the future, then the declaration of the referencing item changes to match. These include delimiters, identifiers, literals, and comments.

It is not legal to embed any other characters including whitespace characters inside a delimiter. Some of the more common delimiters follow. Keywords can be used as ordinary user-defined identifiers, but this is not recommended.

Reserved words cannot be used as ordinary identifiers. They can be used as quoted identifiers, but this is not recommended. Predefined identifiers can be used as user-defined identifiers, but this is not recommended. A local declaration will override the global declaration Literals A literal is a value that is neither represented by an identifier nor calculated from other values.

What you see is what you get. For example, 'John' is a character literal and They are intended to help other application developers understand your source text. Comments are typically used to describe the purpose and use of each code segment.

It is also possible to use comments to disable obsolete or unfinished pieces of code or to assist in diagnosis by temporarily disabling certain functions to track down problems. A single-line comment begins with -- and extends to the end of the line. For multiline comments, care must be taken to avoid nested multiline comments. One multiline comment cannot contain another multiline comment. The 'end' delimiter of the nested comment will 'turn off' the comment before the end of the enclosing comment.

This will result in an error. They also improve runtime performance and scalability. Many if not most of the conversions happen automatically when Oracle detects a need to do so. These operations are called implicit conversions. This is explicit conversion. Oracle is extremely good at detecting the need for conversions and performing them implicitly. However, good programming practice is to minimize the need for implicit conversion and to explicitly convert data type where feasible to provide both maximum control over the operation and better visibility.

Implicit Data Conversion The database will automatically perform a data type conversion when it makes sense and is possible… which is part of making sense. There are several rules that apply to implicit data type conversions.

Some of the more common are listed below. Implicit data conversion can only take place when the database recognizes the data being converted as being a valid example of the data it needs to be converted to.

For example character data cannot be implicitly converted to a date unless it is in the default date format specified for the database. Likewise character data cannot be implicitly converted to a number if it contains dollar signs or commas. A nested subprogram can be declared and defined at the same time, or declared initially and defined later in the same block.

Declaring the block before defining it is called forward declaration. Subprograms must be declared before they can be invoked. The forward declaration and the definition must have the same subprogram heading. Variables have both scope and a visibility. The variable is global to any subprograms of the unit that defined it. If a variable name used in the parent is redeclared by one of the nested subprograms, then inside that particular subprogram, both variables are in scope, but only the local variable is visible.

The global variable can only be invoked with a qualifier. If references to those variables were added to those blocks, it would generate an error on compilation, e. It should be hard to read.

Generally the person hurt the most by my code when it is hard to read is me when I have to go back in and debug or make changes. There are four basic tenets to writing readable code: Identifiers -- Earlier in this guide I noted the importance of using a standard naming convention for identifiers.

Capitalization -- A standard convention of capitalizing various words can make a big difference in the readability of code. Indentation -- Indenting loops and control statements is critical to making the program logic more understandable. In addition, indenting elements of SQL statements in your code can make them easier to understand. Capitalization The test objective only deals with indentation, but capitalization is almost as important to readable code.

You'll see examples of all of these depending on the whim of the programmer who wrote it. As I mentioned earlier with naming identifiers, it doesn't really matter which convention you decide to use, so long as you pick one and use it.

You should not write code that uses a lower-case 'begin' to start a block and an upper case 'END' to stop it. This is messy and it is jarring to read. All identifiers, including variables, tables whether user-created or data dictionary tables , columns, and parameters are in lower-case. I should note that when I have been accused of not making my code readable enough, it's in reference to a lack of comments, not a lack of formatting. I will grant that I don't comment my code often enough.

Luckily that isn't a test objective. The indentation can be performed with either spaces or tabs. If you nest multiple levels of control elements, the indentation should indicate what level a given set of code belongs to. The same SQL statement is shown twice below, the first version indented and the second not. This will be covered later in this guide. The client tool will display the results of the query whether one row is returned or a million rows.

If the query will return multiple rows, you must either restrict the results using a WHERE clause so that only one is returned, or aggregate the results so that only a single row is returned.

Bulk operations will be discussed later in this guide. Based on the result of the evaluation, it either runs or skips a sequence of one or more statements.

If the condition evaluates to true, the actions are performed. If the condition evaluates to true, the first set of actions is performed. The conditions are evaluated serially. If any of the conditions is met, then the actions in that section are performed and none of the remaining conditions is evaluated. If none of the conditions evaluates to true and there is no ELSE clause, then no action is taken. The CASE statement is generally a better option than an IF statement when there are multiple different options and a different action is to be taken for each alternative.

It is evaluated against multiple selection values, each of which can be either a literal or an expression. No further conditions will be evaluated. This is unlike the behavior of IF statements that will simply perform no action if conditions are not met and no ELSE clause exists. The only difference is that each of the WHEN clauses contain a logical condition to be evaluated.

The operands can be variables, constants, literals, operators, function invocations, and placeholders. The simplest expression is a single variable. The data type of an expression will be determined from the types of the operands and operators that comprise the expression. The evaluation of an expression will always generate a single value of that type.

When an expression contains multiple operators, they are evaluated in order of operator precedence. The table below lists the operators ordered by precedence from highest to lowest. Operators with equal precedence are evaluated in no particular order. You can change the order of evaluation with the use of parentheses. When parentheses are nested, the most deeply nested operations are evaluated first.

AND and OR are binary operators. NOT is a unary operator. Strictly speaking, you can have a loop that executes only one time, or zero times, but the construct is intended for multiple iterations. If you have a loop where absolutely nothing changes from one iteration to the next, then by definition the loop is infinite, which is 'A Bad Thing'. It is possible to nest multiple loops.

You can also use labels to identify loops, and this is recommended for nested loops to improve readability. There are four statements that allow you to interrupt or exit a loop. Basic loops must make use of one of the exit statements, a GOTO command not recommended , or explicitly raise an exception in order to end the loop in a controlled fashion.

The statements can also be used with the other three loop types. Each of the four can appear anywhere inside a loop, but not outside a loop. It nests two basic loops, both of which have labels.

The outer loop will increment from 1 to 7. Any time that the outer loop is an odd number, the inner loop will exit and begin the next iteration of the outer loop. Reversing the order of the numbers will result in a loop that never runs. You can get a similar result by multiplying references to the loop index by the desired increment. The example below shows several behaviors when the upper and lower bounds are changed.

The index is local to the loop and can only be accessed by statements inside the loop. The variable is read-only and cannot be altered by assignment. The index is undefined once the loop completes and can no longer be referenced. If the index has the same name as a previously declared variable, the loop index hides the other declaration from statements inside the loop.

If nested loops use the same index name, references to the index will use the index of the local loop unless prefixed by a label. Unless one or more statements inside the loop make the condition false or null, the loop will continue indefinitely. Assigning now.

Apply guidelines when using conditional control structures There are a few guidelines that Oracle recommends when using conditional statements. The result will be code that is more readable. Of the two examples below, the second is obviously more readable. The second example shows the first rewritten to the preferred method. The two are logically equivalent, but the second statement is clearer.

Of the two examples below, the second is obviously simpler and easier to read. RECORD types defined in a package specification are public and can be referenced from outside the package when qualified with the package name.

Fields are defined with a name and a data type. The initial value of all fields in a record is NULL by default. The example below defines a record, assigns values to it, and then outputs the results. The record will contain a field for every column of the row, with the same name and data type.

If the row structure of the table changes, then the structure of the record changes to match automatically. Record values will all default to NULL. A record created in this fashion will have a field with the same name and data type of every column in the table. A record declared against that cursor will have every column that the query selects with the corresponding data type. It is possible for the cursor to select every column in the table or only a subset.

The cursor must be either an explicit cursor or a strong cursor variable. The following example defines an explicit cursor whose query selects a subset of columns from the HR. On the test you might see it referred to by either name. An associative array is a set of key-value pairs, where each key is a unique index that acts as a locator for the associated value. Indexes are stored sorted by the index value rather than the order in which they are created.

Associative arrays are intended for temporary data storage. However, they can be made persistent for the life of a database session if declared in a package specification and populated in the package body. However, they can be made persistent for the life of a database session if declared in a package specification and populated in the package body.

They are appropriate for relatively small lookup tables and passing collections to and from the database server. However, you can combine a record with an associative array to tie multiple values to the same index. In this case, the array still has a variable and an index, but the record variable now contains multiple distinct values.

The following example is a variant of the record example used earlier. In the initial example, two records were required to hold data for two employees. With an associative array, a single record declaration can hold multiple individual record values.

In the below example, a record type is declared to hold the individual employee values. Then an associative array is declared to hold a table of that type. The record is populated and then assigned to the array. Each field of a record variable can be accessed by its name. In an associative array, the internal components always have the same data type, and are called elements. Associative array elements can be accessed by its unique index.

It contains both fields and elements the equivalent of columns and rows in a conventional database table. Both a record and an associative array must be declared. When the session ends, the cursors cease to exist. Cursor attributes allow you to get information about session cursors and can be referenced via procedural statements but not through SQL statements.

You can access the attributes of implicit cursors, but there is no means by which you can control them. The syntax of an implicit cursor attribute value is 'SQL' followed by the attribute name. Explicit cursors are declared and defined in a block. They will have a name and be associated with a query.

It is not possible to assign a value to an explicit cursor, use it in an expression, or use it as a formal subprogram parameter or host variable. Because an explicit cursor is named, it can be referenced by name and is sometimes referred to as a named cursor.

The attributes of an explicit cursor are referenced by the cursor name followed by the attribute. For an implicit cursor, it will always return FALSE, because an implicit cursor closes once its associated statement runs. The following example shows the use of attributes with an implicit cursor.

From it you can see that the cursor is not open before the cursor for loop starts or after it ends. Once an explicit cursor has been declared and opened, the FETCH statement allows you to retrieve the rows of the query result set.

Every column returned by the query, must have a corresponding type-compatible variable or field. This is a good bit easier then defining individual column variables — especially when there are a significant number of columns. When the cursors are opened, the parameter values are supplied and the SQL results customized for the supplied data.

It is possible to use a formal cursor parameter anywhere in the cursor query that you can use a constant. Cursor parameters cannot be referenced outside the cursor query itself. The example below defines a cursor with two parameters.

When called, it will return only employees for a given job ID and whose hire date is greater than the number of years supplied.

The code below opens the cursor with two sets of parameters and prints the results for each. The standard locking behavior is designed to provide the maximum concurrency. It allows multiple users and applications to access and update the same data structures without interference or any need to coordinate with each other. Using this clause, you can base an update on the existing values in the rows, because no other user can change the values before the transaction updates them.

The rows are unlocked when you commit or roll back the transaction. When used, it restricts the statement to the current row of the cursor. The below example is a modification of the example in the previous section.

Exceptions can occur due to design flaws, mistakes in coding, unexpected input which could be considered a design flaw , among other sources. Anticipating all possible exceptions is effectively impossible.

This section is designed to trap exceptions and handle them in a controlled fashion. The exception section can be an extremely simple set of statements that ignore all exceptions which is a very bad coding practice, but all too common , or a detailed block of code designed to detect and handle multiple different types of exceptions. When an exception is raised but not handled, an unhandled exception error is returned to the invoker or host environment.

The outcome of the error at that point depends on the host environment. For these errors, the system raises the exceptions implicitly at runtime. Because they have names, it is possible to create exception handlers for them. You can find descriptions of all of them in the Oracle Database Error Messages book.

Only a tiny fraction of the internally defined exceptions are also predefined exceptions. An internally defined exception is an error condition in the database that Oracle has defined that will be raised when certain conditions are met. A predefined exception is a descriptive name assigned to an internally defined exception. For example: "ORA" is an internally defined exception. In these cases, you should declare a name for them so that you can write an exception handler specifically for that exception condition.

To associate a name with an internally defined exception, you must do the following: 1. Declare the name in the declarative part of the appropriate block. Associate the declared name with the appropriate code for the internally defined exception. This means you can only explicitly handle exceptions that you expect.

When using this, you can grab the specific error number and message. If you find that a procedure is prone to a specific internally defined error, you might declare a name for it so that you can handle it explicitly. User-defined exceptions are for creating and handling exceptions that are related to your own application or business logic. User-defined exceptions must be raised explicitly. They are not Oracle errors, so the runtime system will not be able to recognize when they occur.

When called from outside an exception handler, the exception name to be raised must be specified. When a supplied date evaluates to either Saturday or Sunday, the procedure raises the exception explicitly, and handles it with an exception handler. Propagate exceptions in nested blocks and call applications When an exception is raised in a procedure, the control goes to the exception section of that block.

If the exception section handles the exception, then the block terminates and control is returned to the calling program. In order to handle errors successfully, an exception must be declared and associated with the error code. If the exception is not trapped by the enclosing block, then it will in turn pass the exception to any block enclosing it, or to the invoker or host environment as an unhandled exception if it is not nested.

The exception can propagate through any number of enclosing blocks and likewise could be trapped at any level above the one where it occurred. Exceptions do not propagate across remote procedure calls. If the exception is user-defined, then it can propagate beyond its scope. If a user- defined exception propagates beyond the block that declared it, then its name does not exist. There are three examples below, each with two levels of nesting.

In each of the examples, the most deeply nested block raises an exception. The first example traps the exception in the innermost block. The second in the outermost, and the last does not trap it at all. It is normally used to raise a user-defined exception and return the error code and message to the invoker.

Program control is returned to the anonymous block, which handles the exception. Use a modularized and layered subprogram design Modular coding allows you to write code that performs a given function a single time and then use it in many different places.

When writing subprograms, it is best to create smaller subprograms that perform a specific function than larger blocks that perform several different functions.

If you create a single subprogram that performs six different operations, then find later a need to perform only five of those -- it is not possible or at least not without code changes to use the code that already exists.

If the first implementation had broken the operations into six separate subprograms, then reusing five of them or four or three or two at a later date would be easy. You should also look for ways to modularize existing code after the initial implementation. Add parameters as required and change the original code to call the new subprograms with the required parameters.

Breaking your code out in this fashion makes it much easier to maintain and upgrade over time. As far as layered subprogram design. There is a school of thought that pushes separating subprograms that contain SQL statements Data Access Layer , from subprograms that implement business rules Business Logic Layer. Identify the benefits of subprograms It is easier to develop and maintain reliable and reusable code through the use of subprograms. They provide the following features: Modular -- Subprograms can be used to break a program into manageable, well- defined modules.

Simpler Application Design -- The implementation details of the subprograms can be deferred until the main program has been tested. Individual subprograms can then be added and tested one step at a time. Maintainable -- The implementation details of a subprogram can be altered without changing its invokers.

Functions and procedures improve maintainability by storing a block of logic in a single location. Any future changes to the logic only occur in that location. Packageable -- Groups of related subprograms can be stored into packages. Reusable -- Multiple applications in different environments can use the same package subprogram or standalone subprogram.

Improved Performance -- Subprograms are compiled and stored in executable form. Stored subprograms run on the database server and therefore have the advantage of its power and proximity to the data. This reduces network traffic and improves response times. Shareable -- Stored subprograms are cached and shared among users, which lowers memory requirements and invocation overhead.

Create a simple procedure and invoke it from an anonymous block Subprograms can be called from anonymous blocks, but the reverse is not true. Work with procedures A procedure is a subprogram that performs a specific action. A procedure invocation or call is a statement.

Procedures must be declared and defined before they can be invoked. It is possible to declare it first and then define it later in the same block, subprogram, or package. Alternately it can be declared and defined it at the same time. Equivalent terms for a procedure declaration are a procedure specification or procedure spec.

Procedures can accept parameters, update parameters and generate a return value. They are not required to do any of these. Procedures cannot be used in SQL statements. For procedures or functions that contain parameters, they are declared after the subprogram name and before the IS keyword.

For each formal parameter declaration, the name and data type of the parameter is specified, and optionally its mode and default value. Formal parameters can be referenced in the execution part of the subprogram by their declared names. When declaring a formal argument, only the data type should be specified when declaring an argument. The precision for a formal argument is not allowed. These determine the values that are to be assigned to the formal parameters. Corresponding actual and formal parameters must have compatible data types.

Formal parameters can be any of three modes. The mode of a formal parameter determines its behavior. It is used to pass a value to the subprogram. Formal IN parameters act like constants — they are read-only to the subprogram. At the time that the subprogram begins, the parameter value is that of either its actual parameter or the default value of the parameter declaration. Only IN parameters can be initialized to a default value.

The formal parameter will be initialized to the default value of its type generally NULL. When the subprogram begins, the formal parameter has its initial value regardless of the value of the actual parameter. The subprogram should assign a value to the formal parameter. The invoking process cannot assign a value to an OUT parameter — they can only be written by the subprogram. The formal parameter acts like an initialized variable. At the start of the subprogram, its value will be that of its actual parameter.

The subprogram should update its value. The following example creates a procedure that calculates the age in dog years when supplied a given birth date. The procedure is then called from an anonymous block. The parameter value to be passed to the procedure may be specified using the positional or the named method. The named method must be used when not all parameters are specified or when they are not specified in the same order they are declared.

Happy birthday' ; END; In the first example below, the positional method is used. Note that the call to the procedure is a statement. If the procedure is in a different schema, you must prefix the procedure name with the schema name followed by a dot, and have the appropriate rights. Once dropped, it can only be recovered through the use of an export or media recovery.

A procedure cannot have a return clause in the heading. A procedure can have a return statement in the execution block, but it is both optional and not recommended. Whereas procedures are invoked as a statement, functions are invoked as an expression i. As a general rule, procedures are used to perform an action whereas a function is used to compute a value. Like procedures, functions use formal parameters to transfer values to and from the calling environment.

The header section is declared after the function name and before the IS keyword. Local variables are defined after the IS keyword. A function will successfully compile without a RETURN statement in the executable section, but will generate a run-time error if no value is returned on execution.

This is also true if a RETURN statement exists in the executable section, but conditional logic prevents it from being reached. This time the same logic is made into a function. Happy birthday' ; END; You are As with named procedures and functions, packages are stored in the database in compiled form.

Packages are defined in two parts, the specification and the body. The package specification declares public items that can be referenced from outside the package.

Package specifications that do not contain cursors or subprograms can exist independently. Package specs with either of these must have an associated package body. The package body defines the code of public subprograms and the queries of public cursors.

Any subprogram declared in the package specification must be defined in the body. The reverse is not true — subprograms can exist in the body that are not declared in the specification. The package body can also declare and define private items that cannot be referenced from outside the package.

The body can also contain initialization information that declares global variables and an exception-handling part. The interfaces between packages can be made simple and well defined. Package specifications can be coded and compiled without the associated bodies.

Other subprograms can be created that reference the packages, and the bodies themselves can wait until you are ready to complete the application. This allows you to change the implementation details without affecting the application interface. Users cannot develop code that depends on implementation details that might be subject to change.

Subsequent invocations of other subprograms in the package use the incarnation in memory. Dependent subprograms rely only on the parameters and return value that are declared in the specification. Procedures and functions in a package being invoked by external constructs must use the package name as a prefix.

To make a procedure or function public within a package, declare the procedure header in the specification. The header for a procedure includes the procedure name and arguments. The header for a function includes the function name, arguments and return clause. Any public variables, types or constants referenced externally must likewise be prefixed. The body of a package has a header, declaration, and an optional executable section.

The executable section of a package body must be after all subprograms are declared. Any code in this section is executed the first time the package is referenced within a session.

The code will not be executed again unless the user changes sessions or the package is recompiled. Packages, unlike procedures and functions, cannot be called, parameterized, or nested. If subprograms exist in the package body that are not declared in the package specification, then they are private and can only be referenced from inside the package.

In the example below is a sample package. Once again, the age in dog years has been revisited. This time there is a bit more to the logic.

The package calculates relative age when compared to several animal species based on average lifetimes. Note that the YEAR function is prefixed with the package name and a period. This changes the returned age from You can drop the package body only, or both the package body and the spec. You cannot drop just the package specification when a package body exists. When run against a package, it will list all of the subprograms visible in the package specification along with any parameters and return value data types.

The difference in the formal parameters can be in name, number, order, or data type family. The example below defines two subprograms with the same name difference. The procedures calculate the difference between two supplied parameter values. The first calculates the difference in days between two dates. The second calculates the numeric difference between two numbers. It is not possible to invoke a procedure before it has been declared. If subprogram A calls subprogram B and vice versa, neither can be placed first.

A forward declaration declares the subprogram, but does not define it. This allows you to declare and define the second subprogram that will call the one just declared.

Finally you will define the subprogram that was declared earlier. Forward declarations are not an issue in packages because the package specification serves to declare the subprogram. Create an initialization block in a package body The first time that a package is called by a session, the database will instantiate the package for that session.

Every session that calls the package will have its own instantiation of it. What is the exam retirement Policy? Oracle Certification Program normally provides 90 days notice for the retirement of any certification exam. Oracle post announcements on the Certification Web site and also notify exam candidates by email, so please be sure that you always have your most current contact information on file in your Oracle Profile and ensure that you have selected to receive communications from the Oracle Certification Program.

How much time it takes to receive exam result? After completing your Oracle Certification exam within 30 minutes you will receive an email from Oracle notifying you that your exam results are available in CertView. If you have not authenticated your CertView account yet at this point, you will need to. How much time will be given for the 1Z exam?

In this exam you will get 90 minutes to do 63 questions. Is Oracle Database certification useful? Getting certified in Oracle Database will enhance your knowledge and skills by exposing you to a wide array of important database features, functions and tasks.

Oracle Database certification teaches you how to perform complex, hands-on activities through labs, study and practice. Is there any passing score provided for the 1Z exam? How many questions will be there on the 1Z exam?

There will be a total of 63 questions in the exam. Which certifications are associated with the 1Z exam? What is the cost of the 1Z exam? What is the course structure for the 1Z exam??



0コメント

  • 1000 / 1000