72

HR: Sorry, we're a family here but we have to let you go.

Engineer: Okay.

The End.
----

*DELETE FROM employees WHERE 1=1;*

Comments
  • 15
    Dude just successfully cleared all the employee records. Well done!
  • 6
    @GiddyNaya it's like they never existed!
  • 3
    >HR
    ENOUGH.......
  • 10
    Not very efficient, 1=1 will lead to a full table scan and depending on the number of rows it can take a while. "TRUNCATE TABLE employees;" is a lot faster :)
  • 0
    @AlexAC53 That's nice! Me no DB guy. Thanks for the suggestion!
  • 6
    I remember that when a company/hr talks about being a family and shit, remember it's like telling a prostitute you love them.
  • 2
    @sudo-rm-rf it should but some databases throw an error by default when executing a delete statement without where clause, as a safety measure I suppose.
  • 1
    yeah I'm probably adopted

    so much for "family"
  • 1
    Truncate is also quicker because it doesn’t write to the redo log and can’t be rolled back
  • 1
    Delete from employees...

    Foreign key ref errors break the command -> nothing happens
Add Comment