Monday, 17 January 2011

“Choose Life” For DBAs

I’m really really sorry. Someone tagged #sqlmoviequotes on Twitter and I got carried away…

SELECT TOP(1) * FROM LIFE.

SELECT TOP(1) * FROM JOB.

SELECT TOP(1) * FROM CAREER.

SELECT TOP(1) * FROM FAMILY.

SELECT TOP(1) * FROM television ORDER BY SIZE DESC

SELECT * FROM washing_machine CROSS JOIN car CROSS JOIN compact_disc_player CROSS JOIN electrical_tin_opener

SELECT * FROM health, cholestorol, dental_insurance
    WHERE health.status = 'good' and cholestorol.level < 5
   
SELECT * FROM mortgage WHERE interest_rate = 'fixed'

SELECT TOP(1) * FROM home WHERE TYPE = 'starter'

SELECT * FROM person
    INNER JOIN friendship ON person.id = friendship.person_id and friendship.friend_id = 'ME'

SELECT * FROM leisurewear
    INNER JOIN luggage ON leisurewear.color_scheme = luggage.color_scheme
   
SELECT TOP(3) * FROM lounge_furniture WHERE payment_plan = 'hire purchase'
    AND range_id IN (SELECT range_id FROM fabric_option GROUP BY range_id HAVING COUNT(*) > @RANGE_SIZE)
   
SELECT 'diy', CURRENT_USER FROM activity WHERE DATEPART(dw, activity_date) = 1 AND DATEPART(hh, activity_date) < 12

DECLARE @your_mouth INT
DECLARE junk_food CURSOR FOR SELECT * FROM FOOD WHERE TYPE = 'junk'
WHILE @@CURRENT_SHOW IN (SELECT * FROM SHOW WHERE keyword IN ('mind_numbing', 'spirit-crushing')) BEGIN
    FETCH NEXT FROM junk_food INTO @your_mouth
END

BEGIN

    sp_start_job 'brat'
    sp_start_job 'brat'
    sp_start_job 'brat'

    KILL @@SPID
END

SELECT * FROM events WHERE EventDate > GETDATE()

SELECT TOP(1) * FROM LIFE

1 comment:

Anonymous said...

select TOP(1) * from Girlfriends
where funfactor >= 10 and sexskills >= 8 and annoiance <= 1
order by atractivity desc