Useless Blogging

May 26, 2007

Things I Never Knew About SQL

Filed under: Programming,SQL — steegness @ 7:46 am

(Speaking Oracle, specifically)
When trying to SELECT INTO a variable, if the query returns no rows, an exception is thrown. I’d have thought that the variable would just be NULL, but noooooooooo…

You can nest BEGIN..END blocks to your heart’s content, but you can’t have more than one autonomous block within a given BEGIN..END block. (not that I’ve found, at least).

Exceptions don’t always tell you that they’ve been raised. Sometimes you have to figure it out by noticing that a NULL is where your return value should be.

That is all for now. Carry on, people, carry on.

Comments are closed.