Difference between Implicit and Explicit Cursors

Hi All,
Can you just tell me what is the difference between implicit and explicit cursor?
Thanks,
Padma

Hi ,
Implicit Cursor means ,the cursors which are defined impplicitly.Here we use curosr variables as "SQL%found,sql%not found,sql%is open.."
but explicit cursors defined by us like if u create a cursor C1 then
c1%found,c1% not found ,c1%open
Thank you.

Similar Messages

  • Difference between Implicit and Explicit Commit

    Hi All ,
    Can some one pls let me know the difference between  Implicit commit and Explicit Commit .
    Thanks in Advance..

    >
    Kalyan wrote:
    > Hi,
    >
    > An explicit commit happens when we execute an SQL "commit" command.
    >
    > Implicit commits occur without running a commit command and occur only when certain SQL (DDL) statements are executed
    >
    > (Ie, INSERT,UPDATE OR DELETE Statements)
    > >
    > Hope this is clear & Helpful Short and Simple.
    >
    > Thanks
    > Kalyan
    Highlighted bit is incorrect.

  • Difference between implicit and explicit enhancement points

    Hi Folks,
    I had learned many documents to findout the difference between explicit and implicit enhancement point.I got the theoritical knowledge on that but losing on the practical side..
    Can anybody help me out with one real time scenario where the explicit enhancement points have been implemented and the step by step procedure to implement it..
    Hoping for the positive response from you..
    Regards,
    Rohan.

    Hi Rohan,
    In implicit they are available at the beginning of subroutines defined in the standard reports.
    Edit-> Enhancement operations->show implicit enhancement options.
    This will highlight all the implicit enhancements in the report.
    In Explicit enhancement we have two different types of enhancements -
    Enhancement point and Enhancement section.
    Enhancement point - SAP has some standard functionality defined for a report , but it may be required that you'll need to add your own code. In this case the code that you'll add will be executed along with the standard code.
    Enhancement section - SAP has its standard functionality defines but it may not suit your requirement, in that case you may need to add your code and you'll need that code to be executed only. By this method the existing code is automatically commented and a copy of the same code is available to edit.
    After executing the report only your code will be executed and the standard code will be bypassed.
    For Practicle implementation, follow this link.
    Link : [http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/bb54c452-0801-0010-0e84-a653307fc6fc]
    i hope it will give you some clear picture....
    Thanks.
    Anurag

  • What is the real time use of implicit and explicit cursors in pl/sql

    what is the real time use of implicit and explicit cursors in pl/sql.............please tell me

    You can check the following link ->
    http://www.smart-soft.co.uk/Oracle/oracle-plsql-tutorial-part5.htm
    But, i've a question ->
    Are you student?
    Regards.
    Satyaki De.

  • What is implicit and explicit cursor ?

    I need to know what is implicit cursor and what is Explict one with a sample source.
    Also what is the difference between these two?
    Thank you

    Check this:
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14261/sqloperations.htm#sthref1274

  • Implicit and explicit cursors

    i want to know when to it is recommended to use the implicit cursors (for rec in….) and when it is recommended to use explicit cursors(open cursors….)

    As Brett said, both methods require an explicit cursor definition. What is implicit in the FOR cursor loop is the opening and closing of the cursor. If you use a cursor FETCH loop, you need to code that explicitly yourself.
    My recommendation is to use the cursor FETCH loop and code those two additional OPEN CURSOR and CLOSE CURSOR statements. Reason: a cursor fetch loop allows for proper bulk processing code to be used. It does not rely on the implicit bulk fetching (of 10 rows per time) of a FOR cursor loop - which btw is only available in 10G.
    A FOR cursor loop does not scale. You cannot make the bulk fetching larger. Or smaller. You cannot do bulk updates or inserts in the loop.
    So I do not care what the experts think and say, for me the answer is clear cut. You want to write scalable and performant code? You will use a cursor fetch loop. Not a for cursor loop.

  • Ref Cursor over Implicit and explicit cursors

    Hi,
    In my company when writing PL/SQL procedure, everyone uses "Ref Cursor",
    But the article below, says Implicit is best , then Explicit and finally Ref Cursor..
    [http://www.oracle-base.com/forums/viewtopic.php?f=2&t=10720]
    I am bit confused by this, can any one help me to understand this?
    Thanks

    SeshuGiri wrote:
    In my company when writing PL/SQL procedure, everyone uses "Ref Cursor",
    But the article below, says Implicit is best , then Explicit and finally Ref Cursor..
    [http://www.oracle-base.com/forums/viewtopic.php?f=2&t=10720]
    I am bit confused by this, can any one help me to understand this?There is performance and there is performance...
    To explain. There is only a single type of cursor in Oracle - that is the cursor that is parsed and compiled by the SQL engine and stored in the database's shared pool. The "+client+" is then given a handle (called a SQL Statement Handle in many APIs) that it can use to reference that cursor in the SQL engine.
    The performance of this cursor is not determined by the client. It is determined by the execution plan and how much executing that cursor cost ito server resources.
    The client can be Java, Visual Basic, .Net - or a PL/SQL program. This client language (a client of SQL), has its own structures in dealing with that cursor handle received from the SQL engine.
    It can hide it from the developer all together - so that he/she does not even see that there is a statement handle. This is what implicit cursors are in PL/SQL.
    It can allow the developer to manually define the cursor structure - this is what explicit cursors, ref cursors, and DBMS_SQL cursors are in PL/SQL.
    Each of these client cursor structures provides the programmer with a different set of features to deal with SQL cursor. Explicit cursor constructs in PL/SQL do not allow for the use of dynamic SQL. Ref cursors and DBMS_SQL cursors do. Ref cursors do not allow the programmer to determine, at run-time, the structure of the SQL projection of the cursor. DBMS_SQL cursors do.
    Only ref cursors can be created in PL/SQL and then be handed over to another client (e.g. Java/VB) for processing. Etc.
    So each of the client structures/interfaces provides you with a different feature set for SQL cursors.
    Choosing implicit cursors for example does not make the SQL cursor go faster. The SQL engine does not know and does not care, what client construct you are using to deal with the SQL cursor handle it gave you. It does not matter. It does not impact its SQL cursor performance.
    But on the client side, it can matter - as your code in dealing with that SQL cursor determines how fast your interaction with that SQL cursor is. How many context switches you make. How effectively you use and re-use the SQL (e.g. hard parsing vs soft parsing vs re-using the same cursor handle). Etc.
    Is there any single client cursor construct that is better? No.
    That is an ignorant view. The client language provides a toolbox, where each tool has a specific application. The knowledgeable developer will use the right tool for the job. The idiot developer will select one tool and use it as The Hammer to "solve" all the problems.

  • H2 devide implicit and explicit created indexes by dictionary views?

    For migrating amounts of data it is useful to drop and recreate indexes and referencing constaints. A implicit created index by defining a primary/unique key constraint will be dropped implicitly by dropping the before mentioned constraint. Creating such a constraint after creating an equivalent index with the constraint name will result in an other behaviour. The explicit created index will not be dropped by dropping the referencing primary/unique key constraint.
    So far so good and well known. The question is: Which dictionary view columns will show me the difference between implicit and explict created indexes if I try to dynamically drop and recreate indexes and unique / primary key constraints?

    Oracle Version is always helpful in answering questions, but for 9i you can find the system generated by:
    dba_indexes.generated = 'Y'
    or
    'SYS_' naming convention for system generated indexes
    or
    dba_constraints.constraint_name = dba_constraints.index_name
    Hope this helps - JTommaney

  • Difference between implicit enhancement and explicit enhancement

    What is the difference between implicit enhancement and explicit enhancement .

    Hi Peters,
    Implicit enhancement option
    Throughout the ABAP system, enhancement options are automatically available at certain pre-defined places. Some of the implicit options are:
    u2022 At the end of all the programs (Includes, Reports, Function pool, Module pool, etc.), after the last statement
    u2022 At the beginning and end of all FORM subroutines
    u2022 At the end of all Function Modules
    u2022 At the end of all visibility areas (public, protected and private) of local class
    To view all the implicit options available in a source code, choose u2018Edit -> Enhancement Operations -> Show Implicit Enhancement Optionsu2019 from the editor.
    Befor that you click on the spiral icon button in the application toolbar
    Explicit enhancement option
    The Implicit enhancement options are provided at specific source code places explicitly by SAP (Note that these enhancement definitions can also be created by partners and customers in their code).
    There are two types of Explicit Enhancement options available. One which can be provided at a specific place - called Enhancement Point, and another which can be used to replace a set of statements u2013 called Enhancement Section. For this, we now have two new ABAP statements, viz.
    u2022 ENHANCEMENT-POINT
    u2022 ENHANCEMENT-SECTION
    When the Enhancement-Section is implemented, only the implementation gets executed and the original code doesnu2019t get executed. This is a new technique, which didnu2019t exist previously in any of the old ways of enhancing, to exclude any standard SAP code from execution. Because of this, there can be only one active implementation of an Enhancement-Section. On the other hand, there can be multiple active implementations of an Enhancement-Point, in which case all the implementations will be executed with no guarantee in the order of execution.
    For more information check the following link
    [http://help.sap.com/saphelp_nw70/helpdata/en/94/9cdc40132a8531e10000000a1550b0/frameset.htm]
    Thanks,
    Surya

  • Difference between automatic and non-automatic page attributes

    Hi,
    Can anyone tell me difference between automatic page attributes and non-automatic page attributes?
    and also difference between stateful and stateless mode with examples?
    Thanks
    Narendra

    Hi Mullapudi,
    If you mark a page attribute as u2018automaticu2019 (auto in the system), the attribute automatically gets its values via the calling URL or
    via the navigation process from other pages.
    This kind of attribute only has to be declared for one page.
    It is identified by its name equivalence.
    If another page uses a parameter with the same name,
    at runtime that parameter automatically
    gets the same values as the attribute.
    Non-automatic page attributes
    If you flag a page attribute as non-automatic, the attribute gets its values from the class attribute.
    The visibility of page attributes when parameters are transferred between BSP pages depends on whether the navigation is explicit or implicit.
    Explicit navigation
    For example, if navigation->goto_page(page.htm)
    Implicit navigation
    With implicit navigation, the page attributes are transferred automatically from OnInputProcessing to OnInitialization, both in stateful and stateless mode.
    The auto page attributes are refilled by the request, both in stateful and stateless mode.
    Reward if Useful...
    Regards,
    Anita. B

  • Difference  Between Provide and RP-PROVIDE-FROM-LAST  in ABAP-HR

    what is the Difference Between Provide and RP-PROVIDE-FROM-LAST  IN hR. IF I want to retrieve data in BETTWEEN BEGDA AND ENDDA. what these 2 ill return.
       Both ill return the LAtest record. plz  let me know what ill happen.
      With Regards,
       Venkata Suresh K

    PROVIDE is like a loop statement and it reads records between BEGDA and ENDDA. There is a lot to it, you can read doc...
    RP-PROVIDE-.. _> This is like read table.
    It is similar to : Sort itab descending. read itab index 1.
    If you want data between BEGDA and ENDDA and you have 2 internal tables, you can use PROVIDE. Otherwise, you can use a normal LOOP statement. Provide is helpful if you want to get data from more than 1 table.
    For eg: Infotype 0000 has 2 records from 1.1.2000 to 1.1.2006, and 2.1.2006 to 31.12.9999, and Infotype 0185 has 1 record from 1.1.2005 to 31.12.9999.
    If you use a provide BETWEEN BEGDA and endda in this case, it will run through the loop 3 times with these dates :
    1.1.2000 to 31.12.2004.
    1.1.2005 to 1.1.2006
    2.1.2006 to 31.12.9999
    If a record is not there in one of the internal tables during the date, there is a PNNNN_VALID flag which is filled up (4.6c) and in mySAP onwards, you have explicit valid flags.
    Hope it helps. Please reward points if helpful.
    Regards.
    Samant

  • Can somebody explain difference between SYS_REFCURSOR and REFCURSOR

    I want to know the exact difference between sys_refcursor and refcursor.

    Please do not post Re: SYS_REFCURSOR and CURSOR. It makes them soggy and difficult to light, er, hard to follow.
    Thank you for your future co-operation.
    Cheers, APC

  • What is the difference between tkprof and explainplan

    Hi,
    what is the difference between tkprof and explainplan.

    Execution Plans and the EXPLAIN PLAN Statement
    Before the database server can execute a SQL statement, Oracle must first parse the statement and develop an execution plan. The execution plan is a task list of sorts that decomposes a potentially complex SQL operation into a series of basic data access operations. For example, a query against the dept table might have an execution plan that consists of an index lookup on the deptno index, followed by a table access by ROWID.
    The EXPLAIN PLAN statement allows you to submit a SQL statement to Oracle and have the database prepare the execution plan for the statement without actually executing it. The execution plan is made available to you in the form of rows inserted into a special table called a plan table. You may query the rows in the plan table using ordinary SELECT statements in order to see the steps of the execution plan for the statement you explained. You may keep multiple execution plans in the plan table by assigning each a unique statement_id. Or you may choose to delete the rows from the plan table after you are finished looking at the execution plan. You can also roll back an EXPLAIN PLAN statement in order to remove the execution plan from the plan table.
    The EXPLAIN PLAN statement runs very quickly, even if the statement being explained is a query that might run for hours. This is because the statement is simply parsed and its execution plan saved into the plan table. The actual statement is never executed by EXPLAIN PLAN. Along these same lines, if the statement being explained includes bind variables, the variables never need to actually be bound. The values that would be bound are not relevant since the statement is not actually executed.
    You don’t need any special system privileges in order to use the EXPLAIN PLAN statement. However, you do need to have INSERT privileges on the plan table, and you must have sufficient privileges to execute the statement you are trying to explain. The one difference is that in order to explain a statement that involves views, you must have privileges on all of the tables that make up the view. If you don’t, you’ll get an “ORA-01039: insufficient privileges on underlying objects of the view” error.
    The columns that make up the plan table are as follows:
    Name Null? Type
    STATEMENT_ID VARCHAR2(30)
    TIMESTAMP DATE
    REMARKS VARCHAR2(80)
    OPERATION VARCHAR2(30)
    OPTIONS VARCHAR2(30)
    OBJECT_NODE VARCHAR2(128)
    OBJECT_OWNER VARCHAR2(30)
    OBJECT_NAME VARCHAR2(30)
    OBJECT_INSTANCE NUMBER(38)
    OBJECT_TYPE VARCHAR2(30)
    OPTIMIZER VARCHAR2(255)
    SEARCH_COLUMNS NUMBER
    ID NUMBER(38)
    PARENT_ID NUMBER(38)
    POSITION NUMBER(38)
    COST NUMBER(38)
    CARDINALITY NUMBER(38)
    BYTES NUMBER(38)
    OTHER_TAG VARCHAR2(255)
    PARTITION_START VARCHAR2(255)
    PARTITION_STOP VARCHAR2(255)
    PARTITION_ID NUMBER(38)
    OTHER LONG
    DISTRIBUTION VARCHAR2(30)
    There are other ways to view execution plans besides issuing the EXPLAIN PLAN statement and querying the plan table. SQL*Plus can automatically display an execution plan after each statement is executed. Also, there are many GUI tools available that allow you to click on a SQL statement in the shared pool and view its execution plan. In addition, TKPROF can optionally include execution plans in its reports as well.
    Trace Files and the TKPROF Utility
    TKPROF is a utility that you invoke at the operating system level in order to analyze SQL trace files and generate reports that present the trace information in a readable form. Although the details of how you invoke TKPROF vary from one platform to the next, Oracle Corporation provides TKPROF with all releases of the database and the basic functionality is the same on all platforms.
    The term trace file may be a bit confusing. More recent releases of the database offer a product called Oracle Trace Collection Services. Also, Net8 is capable of generating trace files. SQL trace files are entirely different. SQL trace is a facility that you enable or disable for individual database sessions or for the entire instance as a whole. When SQL trace is enabled for a database session, the Oracle server process handling that session writes detailed information about all database calls and operations to a trace file. Special database events may be set in order to cause Oracle to write even more specific information—such as the values of bind variables—into the trace file.
    SQL trace files are text files that, strictly speaking, are human readable. However, they are extremely verbose, repetitive, and cryptic. For example, if an application opens a cursor and fetches 1000 rows from the cursor one row at a time, there will be over 1000 separate entries in the trace file.
    TKPROF is a program that you invoke at the operating system command prompt in order to reformat the trace file into a format that is much easier to comprehend. Each SQL statement is displayed in the report, along with counts of how many times it was parsed, executed, and fetched. CPU time, elapsed time, logical reads, physical reads, and rows processed are also reported, along with information about recursion level and misses in the library cache. TKPROF can also optionally include the execution plan for each SQL statement in the report, along with counts of how many rows were processed at each step of the execution plan.
    The SQL statements can be listed in a TKPROF report in the order of how much resource they used, if desired. Also, recursive SQL statements issued by the SYS user to manage the data dictionary can be included or excluded, and TKPROF can write SQL statements from the traced session into a spool file.
    How EXPLAIN PLAN and TKPROF Aid in the Application Tuning Process
    EXPLAIN PLAN and TKPROF are valuable tools in the tuning process. Tuning at the application level typically yields the most dramatic results, and these two tools can help with the tuning in many different ways.
    EXPLAIN PLAN and TKPROF allow you to proactively tune an application while it is in development. It is relatively easy to enable SQL trace, run an application in a test environment, run TKPROF on the trace file, and review the output to determine if application or schema changes are called for. EXPLAIN PLAN is handy for evaluating individual SQL statements.
    By reviewing execution plans, you can also validate the scalability of an application. If the database operations are dependent upon full table scans of tables that could grow quite large, then there may be scalability problems ahead. On the other hand, if large tables are accessed via selective indexes, then scalability may not be a problem.
    EXPLAIN PLAN and TKPROF may also be used in an existing production environment in order to zero in on resource intensive operations and get insights into how the code may be optimized. TKPROF can further be used to quantify the resources required by specific database operations or application functions.
    EXPLAIN PLAN is also handy for estimating resource requirements in advance. Suppose you have an ad hoc reporting request against a very large database. Running queries through EXPLAIN PLAN will let you determine in advance if the queries are feasible or if they will be resource intensive and will take unacceptably long to run.

  • Performance difference between page and scroll

    Hi experts:
    What is the technical difference between paging and scrolling, especially as pertains to database access and performance?  The scenario would be a table result in a view where 200 results exist for a query.  A scrollable table would show all results, while the paging table would show 10/20 per page.  Is the database selection the same for both approaches?  Or is the paging approach going to make more trips?  If there are trips - how does the UI know how many pages should be presented?  Is one or the other a better approach for data which is not existing in CRM system?
    regards,
    bill.

    If you look at the servlet translated from a JSP, you'll see these lines:
    Object page = this;
    pageContext = _jspxFactory.getPageContext(this, request, response,
                null, true, 8192, true);
    _jspx_page_context = pageContext;
    application = pageContext.getServletContext();So page is simply an alias for this.
    And PageContext is analogous to ServletContext but please notice, it's not the same or a replacement; application is the implicit reference to ServletContext and not pageContext. There is no equivalent of pageContext in servlets.
    Please note that the page scope doesn't refer to the page object but to the pageContext. Therefore, what Manivel said above
    page is used as a scope with in one jspisn't correct.
    Edited by: nogoodatcoding on Sep 24, 2007 1:30 PM

  • Difference between CS3 and CS4 when placing images, percentage not kept

    There is some kind of difference between CS3 and CS4 when placing images. The images I've dealt with right now were vector images but it might apply to all kinds of images.
    When replacing an existing image, the CS4 behaviour is to let the image fill up the frame. In CS3 the percentage was set to 100% as default (the % you see when selecting the image, not the container).
    Also when replacing an impage in CS4, the "inner" image frame is kept, while in C3, the percentage was kept.
    Is there some kind of placement preferences / settings to let CS4 act the same wat as CS3 did, when placing an image?
    -- Andreas

    Yes, the behavior was changed in CS4 (and many users, like me, prefer the new system).
    If you click and drag a loaded image place cursor the entire image will be be scaled to fit the proportionally drawn frame -- a huge timesaver if you mostly place uncropped art. If you want 100% of the image at 100% scale, just click and release -- same as before, or as before you can pre-draw a frame and place into it and your image will come in cropped at 100% (unless you've changed the fitting options for the frame before placing).
    Peter

Maybe you are looking for