Group by and distinct do inherent sorting of data in a select statement so need not have order by in some cases.
Monday, September 10, 2012
Monday, February 15, 2010
PL/SQL questions
All Interview questions come primarily from "Oracle PL/SQL Programming book" 5th Edition by Steven Feuerstein
ISBN : 978-0-596-51446-4 (this book covers upto 11g 11.2)
- How to hide the implementation of a cursor?
hint: inside a package. But how?
- What are package variables?
- How to declare public package variables
- How to declare private package variables
- What is the life of a package variable , also what is the visibility
- How to initialize package data? give me at least 2 ways (there are 3)
- If Package variable initialization fails , can it be caught? how to avoid this?
eg v varchar2(1) := 'ABC' will give value error. How will you catch this?
hint: if you declare as a package variable either in package spec or body but outside
any procedure/function, it will give error only the first time the package is initialized
it wont be caught because there is no exception section.
- where does package data get loaded? in SGA/PGA? How to load package data in SGA? any advantages?
- What is the disadvantage of Package based caching?
hint : 1) PGA 2) serially_resuable
- When do you omit a semicolon with dynamic sql?
- expdp. how to export metadata only?
- Is the whole package loaded in memory or just the called proc/function?
- how to overload a function/procedure (subprograms)? What are the limitations? Can they be overloaded outside a package?
hint: look at the standalone procedure create syntax "create or replace function|procedure"
- what are forward declarations?
ISBN : 978-0-596-51446-4 (this book covers upto 11g 11.2)
- How to hide the implementation of a cursor?
hint: inside a package. But how?
- What are package variables?
- How to declare public package variables
- How to declare private package variables
- What is the life of a package variable , also what is the visibility
- How to initialize package data? give me at least 2 ways (there are 3)
- If Package variable initialization fails , can it be caught? how to avoid this?
eg v varchar2(1) := 'ABC' will give value error. How will you catch this?
hint: if you declare as a package variable either in package spec or body but outside
any procedure/function, it will give error only the first time the package is initialized
it wont be caught because there is no exception section.
- where does package data get loaded? in SGA/PGA? How to load package data in SGA? any advantages?
- What is the disadvantage of Package based caching?
hint : 1) PGA 2) serially_resuable
- When do you omit a semicolon with dynamic sql?
- expdp. how to export metadata only?
- Is the whole package loaded in memory or just the called proc/function?
- how to overload a function/procedure (subprograms)? What are the limitations? Can they be overloaded outside a package?
hint: look at the standalone procedure create syntax "create or replace function|procedure"
- what are forward declarations?
Subscribe to:
Comments (Atom)