Nov 012013
 
set sqlterminator ?

select queries
from   your_database?

QUERIES
----------------
Become questions

set sqlterminator !

select queries
from   the_database!

QUERIES
--------------------
Become exclamations!

You need to run in SQL*Plus to use this. I can’t think of a particularly good use – other than playing tricks on your colleagues! ;)

Oct 112013
 

As before, if you can guess the film titles from these SQL clues then put your answers in the comments. If you’ve missed the earlier quizzes, have a look at parts one, two and three.

select * 
from   mandibles;

select *
from   pedites
where  side <> 'right';

select *
from   nuptials
where  rownum <= 4
union
select *
from   burial
where  rownum = 1;

select existence
from   numbers
where  value = circumference/diameter;

create procedure africa (
  karen out varchar2
) as
begin
  null;
end;

create table armoured_soldiers as
  select x, y
  from   points
  where  ((x-a)*(x-a)) + ((y-b)*(y-b)) = r*r;
Sep 272013
 

Can you get these films from the SQL clues below? Put your answers in the comments! If you want more, have a look at the first and second in this series.

begin
  private_ryan;
  commit;
end;
/

select colour
from   kilometers
where  distance = 1.6
and    shade between 'blue' and 'yellow';

select *
from   the_unhappy
where  nationality = 'French';

select *
from   back as of timestamp sysdate + 1;

select top 1 *
from   ballistic_weapons;

select common_surname
from   states
where  capital = 'Indianapolis'
and    military_expedition = 'final';
Sep 202013
 

Continuing the SQL brainteasers (back to the first), can you figure these next six film titles from the SQL clues? Put your answers in the comments!

select greenbacks
from   clenched_hands;

select *
from   sodium
natural join chlorine;

alter session set nls_territory = Italy;
exec dbms_job.run(:job);

begin
  execute immediate 
    'begin mimus_polyglottos; end;';
end;

select direction
from   compass
where  degrees = 337.5;

select danger
from   transactions
where  isolation_level < 'serializable';
Sep 132013
 

Can you guess the name of the film from these code snippets? Put your answers in the comments!

begin
  return skywalker;
end;

exec dbms_lock.sleep(:gorgeous);

select count(*)
from   primates 
having count(*) = 12;

select annoying_habits
from   you
where  rownum <= 10;

select * 
from   mission
where  1 = 2;

select power(motor_company, 1)
from   man
where  address = 'the world'
and    status = 'secret';