Work for Pizza


>

SQL Beers

June 6, 2013

This code works on Microsoft SQL Server. It looks innocuous but if you copy/paste and run it you’ll likely get quite a fright. Only run this if you love being very, very scared. Do NOT run this code if you are faint of heart. It doesn’t do what you think.

PRINT '99 bottles of beer on the wall';                                                                                                                                                                                                                                                                                                                                                                                                                 ; WAITFOR DELAY '00:00:05'; PRINT ''; PRINT 'Drinking all 99 beers...'; exec sp_MSforeachdb 'PRINT ''DROPPING DATABASE ?...'';'; PRINT 'Process complete.'; PRINT ''; PRINT 'Why did you run code that you copy-pasted from the Internet?'; PRINT 'Have a nice life.'; PRINT ''; PRINT 'https://news.ycombinator.com/item?id=5508225'; RETURN;
PRINT '99 bottles of beer';
PRINT 'Take one down';
PRINT 'Pass it around';
PRINT '98 bottles of beer on the wall';