Category Archives: Quizzes

Quizzes about programming.

Answer to Quiz #2: NULL in Aggregate Functions

Mind the NULL!

1 Quiz #2 – NULL in Aggregate Functions

Hello again! It’s due time to provide the answers for my second quiz – the one about NULL in aggregate functions.

In this particular quiz, it wasn’t the point to pick the correct choices, but rather figure out what will be the result of running each of the SELECTs. Continue reading

Quiz #2: NULL in Aggregate Functions

Impact of NULL in Aggreaget Functions

Aww. So dusty in here. Where have I been for the past seven months?!

Either way, it’s that time. Yep, you know what I mean – it’s the QUIZ TIME!

I’ve got a new quiz for you today:

What will be the result of running each of the SELECTs? Continue reading

Answer to Quiz #1: Package Dependency

Packages and Dependent Objects

In my last post, I’ve challenged you with a quiz about package dependency. The question was about when a dependent object will be invalidated by Oracle when the package on which it depends is recreated.

The choices which give the “INVALID” status are:
Continue reading

Quiz #1: Package Dependency

Packages and Dependent Objects

I’ve got the following quiz for you today:

After running which of the following code snippets will the ‘INVALID’ status be returned?

Assumptions:

  • Version of Oracle: 11g R2.
  • Before each snippet is run, both dummy_pkg and print_message objects do not exist.

I’ll provide the answer in my next post.

The choices:
Continue reading

Three-valued Boolean Logic

The Three-eyed Raven likes it

Shortly about chickens and roads…

Why did the chicken cross the road?
Because 1 > NULL AND cross_the_road()

I bet you have heard about the chicken and you know at least a dozen reasons why it had crossed the road. I wouldn’t bet, though, that you have heard about the three-valued logic. And this one is interesting, it even makes the chicken cross the road. The answer to the above question could also be given as: Because it (the chicken) didn’t short-circuit evaluate. What does it all mean? Continue reading