Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon.

Pages: 1-

sql

Name: Anonymous 2006-03-07 4:23

What do you prefer:

select primary_key
from table_name
group by primary_key
having min(value) <> max(value)

Name: Anonymous 2006-03-07 6:01 (sage)

Sorry, I don't speak COBOL.

Name: Anonymous 2006-03-07 8:51

>>2

Fail.

Name: Anonymous 2006-03-07 10:58

SQL stands for squirrel

Name: Anonymous 2006-03-07 21:07

>>4

That reminds me ..

I was on the train last week and this drunk old guy slurred, "What does fag stand for? ... 'Got AIDS yet?'"

I tried to stifle a chuckle at his ineptitude but when this similarly retarded girl sitting opposite me blurted out "What?? I haven't got AIDS!" I felt a thin stream of piss go straight down my leg, and I laughed so hard I cried.

Name: Anonymous 2006-03-07 21:12

Don't you mean "gay"?

Name: Anonymous 2006-03-07 21:13 (sage)

I fail. nm.

Name: Anonymous 2006-03-08 16:09

The first one is obviously much better. If you like the second one you are obviously a stupid nazi. Nobody would ever like the second one.

Name: Anonymous 2006-03-08 18:03

>>8

The first one is faster, too.

Name: Anonymous 2006-03-08 19:13

>>9
Couldn't the DB optimize it though? Because if it was properly optimized, the latter could be faster.

To find min and max you need to evaluate all values. The other version can stop as soon as it finds two values that don't match.

Name: Anonymous 2006-03-08 19:22

>>10

As they are functionally equivalent, they should optimize to the same thing. (But I bet they don't)

Name: Anonymous 2006-03-08 19:29

>>1

If that is indeed a primary key being grouped, then the result set would be empty. Is this some sort of joke?

Name: Anonymous 2009-11-21 17:12

From a Jew's face
The wicked Devil speaks to us,
The Devil who, in every country,
Is known as an evil plague.

Would we from the Jew be free,
Again be cheeful and happy,
Then must youth fight with us
To get rid of the Jewish Devil.

Name: sage 2010-07-14 13:22

>sage
[quote]sage[/quote]
sage

Name: Anonymous 2010-07-14 14:19

>>1
Wow, there's some fucked up old bug.

Name: ​​​​​​​​​​ 2010-10-23 8:46

Name: Anonymous 2011-02-04 19:13

Don't change these.
Name: Email:
Entire Thread Thread List