My fave is the one where the son’s name destroyed the entire database.. Maybe because I’m dealing with database everyday at work, that why I can connect with the joke better.
Who would name their son “Robert’); DROP TABLE Students; –“? Is it possible to have such a name? How do you pronounce it?
Anyway, this comic is full of things that by right won’t occur in real life. But imagine if that name is allowed, it will surely create a mess in the school database. Did you catch the joke? I was laughing in office when I saw it. I forward to a few of my colleagues, some of them didn’t catch the joke until I explained to them.
This joke is about database SQL. For the uninitiated, let me try to explain some basic SQL.
For adding record (for example Students table), the syntax is usually like this:-
INSERT INTO Students (Name, age, address) VALUES (‘DK’, ’27’, ‘Singapore’);
Imagine if that guy’s name is added into the database. The insert statement will look something like this:-
INSERT INTO Students (Name, age, address) VALUES (‘Robert’); DROP TABLE Students; –‘, ’23’, ‘xkcd’);
That will break the SQL into 3 parts.
The first part will return a insert error cause insufficient input entered.
INSERT INTO Students (Name, age, address) VALUES (‘Robert’);
The second part will delete the entire student table in the database.
DROP TABLE Students;
And the last part will comment off the remaining syntax so that the command can be executed without errors.
–‘, ’23’, ‘xkcd’);
Clever right? Who would have thought of that?
Anyone going to name his/her son Robert’); DROP TABLE Students; — ?