For some reason I decided to re-join a discussion in the SQL community from way back in 2012.
— Jeff Smith (@thatjeffsmith) May 28, 2015
The short version: it’s hard to know what you’re looking at in database code (read: SQL, stored procs) when your tables don’t start with ‘TBL’ or your views don’t start with ‘VIEW.’
SELECT stuff, more_stuff, yet_more_stuff FROM bit_bucket
So, is ‘bit_bucket’ a table, a view, a synonym, a materialized view, or what?
One camp would say you need to name that object, ‘TBL_BIT_BUCKET.’
That seems weird to me. But then I’m a weird guy.
As a tool geek, I’m used to have really easy ways of finding out what I’m looking at.
How to do those 3 things in blog-format:
Note, if you do the ctrl+click or the pop-up DESC, if you switch to the info tab, it will tell you what’s what.
So for me, I don’t see a need to add labels to my object names.
And if I’m in a command-line interface, and I’m doing serious coding, I can always use the Oracle DESC command to see what’s what.
If you’re curious about the debate, here’s the original blog post from Karen in 2012.
If you’re curious about what those little red pictures are in the screenshot above…
I was having some fun with how to display NULLs in SQL Developer, thought, NULL, that rhymes with skull, and I like to see my NULLs in red…RED SKULL!