Re: SQL Fun
Posted in 2007
Yes, January is traditionally a quiet month for us, too.
--
Neil Truby t:01932 724027
Director m:07798 811708
Ardenta Limited e:neil.truby@ardenta.com
"bozon" <curtis@crowson1.com> wrote in message
news:1169040897.129672.290700@11g2000cwr.googlegroups.com...
>I was thinking about this the other day and I created some "amusing"
> examples. Technically SQL has no reserved words so you can create some
> abdominal SQL. Of course in reality some of them don't work or don't
> work all of the time so here are some examples of some really bad
> things to do. All of these statements work except one. Can you tell
> which one without actually running them? I can't. (all rights reserved
> ;-) )
>
> create table select(
> serial serial,
> create int,
> table int,
> order int,
> select int,
> from int,
> where int,
> and int,
> or int,
> insert int,
> update int,
> in int,
> int int,
> delete int,
> drop int,
> into int,
> set int
> ) ;
> insert into select (
> serial, create, table, order, select,
> from, where, and, or, insert,
> update, in, int, delete, drop,
> into, set
> )
> values (
> 0, 1, 2, 3, 4,
> 5, 6, 7, 8, 9,
> 10, 11, 12, 13, 14,
> 15, 16
> ) ;>
> select select from select;>
> select from from select where and = 5 and or = 7 ;>
> delete from select where where = 10 and and = 20 ;>
> delete from select where into = 5;>
> update select set set = 20 where where = 5 and order = 7 and drop = 8
> and and = 2 ;>
> select or, and, update from select where and = 6 and or = and ;>
> select or, and, from from from select ;>
> select or and, and or, from from select ;
>
> select or select, and where, from from select;
>