Category: Uncategorized

Amped on Amper

This “problem” rates in the top 10 all time viewed questions on AskTom, and it demonstrates the importance of reading the Concepts guide with Oracle SQL> create table CARTOONS ( name varchar2(30)); Table created. SQL> insert into CARTOONS values (‘Tom & Jerry’); Enter value…

How can I see my invisible columns

A cool new feature in 12c is the ability to make a column invisible.  The concept has existed since 8i to handle things like “set unused” and function based indexes, but now it is available to developers directly. SQL> create table T ( c1…

Equi-sized partitions on random data

Had an interesting AskTom question today about dynamically keeping partition sizes in check. The poster had large table, already partitioned, but since there was no logical column to do a range partition on, it was partitioned on a surrogate primary key value. Due to…

Something new learned every day

One of the reasons I leapt at the chance to be on the AskTom team when we resurrected the site, was that it’s like free training.  You get questions on topics you have not visited before, and you get new angles on things you…

On building SQL

I had a fun question on AskTom over the weekend, that of, how to display a monthly calendar for any provided date using just SQL. You can see the question and the answer here But I thought it might be worth explaining the process. …

DEFAULT SEQ.NEXTVAL in 12c

One of the cool things in 12c is that (finally after all these years) a sequence can be assigned as the default value for a column. Of course, some may say “big deal” – after all, it is trivial to create a simple trigger…

Never rely on an assumed order

We’ve (hopefully) all had it drummed into us enough times – you cannot assume the order of results from queries unless you explicitly include an ORDER BY statement. Here’s another trivial example of this- I was doing a little demo script for an AskTom…