Results 1 to 9 of 9

Thread: What is Pragma ? Types of Pragma ?

  1. #1
    Junior Member
    Join Date
    Dec 2011
    Answers
    16

    Post What is Pragma ? Types of Pragma ?

    What is Pragma ? Explain in details types of pragma ?


  2. #2
    Expert Member
    Join Date
    Sep 2005
    Answers
    206

    Re: What is Pragma ? Types of Pragma ?

    Hello Pradeep,

    Oracle has inducted few keywords in its glossary which behave as a clue to the compiler. These keywords are named as Pragma(s), which are read by the compiler to be decisive over the method used for the compilation of current program unit.......Source from Oracle Pragma

    Cheers
    Suji


  3. #3
    Junior Member
    Join Date
    Dec 2011
    Answers
    16

    Re: What is Pragma ? Types of Pragma ?

    Thanks Suji, got clear explanation from link u provided.


  4. #4
    Expert Member
    Join Date
    Sep 2005
    Answers
    206

    Re: What is Pragma ? Types of Pragma ?

    Dear Pradeep,

    I am glad it helped you....

    You are welcome.

    Cheers
    Suji


  5. #5
    Junior Member
    Join Date
    May 2012
    Answers
    18

    Re: What is Pragma ? Types of Pragma ?

    Pragama is compiler directive .

    Example of Autonomous transactions

    Suppose you are updating value from table and you don't have update trigger on that table

    but still you want to maintain a log entry for this update in separate table.

    You can write a procedure and call that procedure to do this . But you can not use "COMMIT" in this called procedure because it will save the entire transaction.

    To avoid this you can declare this procedure as autonomous transaction procedure so that the execution of this procedure will be treated as totally diff. transaction and you can issue commit in called procedure without affecting the main transaction.

    Different types of Pragama are

    * EXCEPTION_INIT
    * RESTRICT_REFERENCES
    * SERIALLY_REUSABLE


  6. #6
    Junior Member
    Join Date
    Jan 2013
    Answers
    9

    Re: What is Pragma ? Types of Pragma ?

    Pragma is a keyword in oracle pl/sql.That is used to provide an instruction to compiler.
    these are most popular pragmas
    exception-init
    pragma-autonomus transaction


  7. #7
    Junior Member
    Join Date
    Mar 2013
    Answers
    19

    Re: What is Pragma ? Types of Pragma ?

    In Oracle PL/SQL, PRAGMA refers to a compiler directive or "hint" it is used to provide an instruction to the compiler. The 5 types of Pragma directives available in Oracle are listed below:

    * PRAGMA AUTONOMOUS_TRANSACTION
    * PRAGMA SERIALLY_REUSABLE
    * PRAGMA RESTRICT_REFRENCES
    * PRAGMA EXCEPTION_INIT
    * PRAGMA INLINE


  8. #8
    Junior Member
    Join Date
    Mar 2016
    Answers
    1

    Re: What is Pragma ? Types of Pragma ?

    Thank you very much, you clear my concepts.


  9. #9
    Junior Member
    Join Date
    Mar 2016
    Answers
    11

    Re: What is Pragma ? Types of Pragma ?

    PRAMA

    The instruction is a statement that provides some instructions to the compiler.

    Pragmas are defined in the declarative section in PL/SQL.


  10.  Sponsored Ads
    Ad


     

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
About us
Applying for a job can be a stressful and frustrating experience, especially for someone who has never done it before. Considering that you are competing for the position with a at least a dozen other applicants, it is imperative that you thoroughly prepare for the job interview, in order to stand a good chance of getting hired. That's where GeekInterview can help.
Interact