Saurabh is the author of our recently published Oracle Advanced PL/SQL Developer Professional Guide Which helps master the advanced features of PL/SQL to design and optimize code using real-time demonstrations. Find the complete interview at the below link http://authors.packtpub.com/content/interview-saurabh-k-gupta-author-ora... Filed under: Oracle Tagged: 1849687226, 9781849687225, Packt, Saurabh K.
begin
case
when oracle_version >= 11 then
select your_sequences.nextval
into variables
from dual anymore;
just_assign_them := like_this.nextval;
end case;
end;
/
It's the simple things that make life better;
not having to select your sequences anymore is definitely one of these!
For a complete script,
Debbie asked a question about why a comparison wasn’t working in the Microsoft Excel SUMIF function when the initial array value was empty. This post answers that question.
The SUMIF function takes a lookup range, which anticipates a one column with a lookup value and another column with a value. The SUMIFS function works along the same line but accepts multiple lookups against a series of lookup list columns.
select *
from keys;
TYPE DESCRIPTION
--------- -----------------------------------
Primary The premier way to locate a row
Foreign Xenophilic links to other tables
Candidate Wished it could be primary, but had
to settle for uniqueness
Whis The amber nectar that keeps me sane
A database without any of the first three constraints
causes me to pour a large glass of the fourth!
create restore point
"we_can_revert_to_with_oracle's"
guarantee flashback database;
Be wary; guaranteed restore points consume space in your flash recovery area until (explicitly) dropped,
which can lead to embarrassing space errors if you forget they're there!
For a worked example of this in action, have a look at this article in Morgan’s library.
create sequence of_endlessly_repeating_digits
cache 2 cycle maxvalue 10;
select of_endlessly_repeating_digits.nextval
from dual
connect by level <= 100;
I've never found a particularly good use for cycling sequences, but I guess they must come in handy somewhere...
Yesterday I wrote a blog on how you can highlight a record in a report. That blogpost can be found here.Learco Brizzi posted a comment on a different way of accomplishing the same thing.
select *
from bitmap_index;
DESCRIPTION
-------------------------------------------
Using 1s and 0s to represent data values
A treasure hunter's missing piece nightmareIn both cases the bit[of a]map helps people with their searches!