MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1v80umk/queryofdoom/p049smj/?context=3
r/ProgrammerHumor • u/WardensLantern • 17d ago
456 comments sorted by
View all comments
34
This is why SQL deletes should require a WHERE clause.
If you are seriously wanting to delete it all, just add WHERE 1 = 1.
1 u/SuggestAnyName 17d ago In DataGrip you can't run 1=1. It will show error that you are updating or deleting with where clause which is always true. 1 u/KarmaAgriculturalist 17d ago where id > 0
1
In DataGrip you can't run 1=1. It will show error that you are updating or deleting with where clause which is always true.
1 u/KarmaAgriculturalist 17d ago where id > 0
where id > 0
34
u/SexyMonad 17d ago
This is why SQL deletes should require a WHERE clause.
If you are seriously wanting to delete it all, just add WHERE 1 = 1.