Created
April 29, 2016 16:39
-
-
Save binki/bc6e371b2d597a954c13a0b8c4853221 to your computer and use it in GitHub Desktop.
SQL WHERE 1=1 as a diff-cleaning technique
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ohnob@DESKTOP-A4G2C0J ~/OneDrive/repos/Main | |
$ diff -u .better.sql.orig .better.sql.new | |
--- .better.sql.orig 2016-04-29 12:37:32.586963400 -0400 | |
+++ .better.sql.new 2016-04-29 12:37:43.936262800 -0400 | |
@@ -1,3 +1,2 @@ | |
WHERE 1=1 | |
-AND Squirrels=1 | |
AND Humans=1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$ diff -u .sql.orig .sql.new | |
--- .sql.orig 2016-04-29 12:37:11.101854800 -0400 | |
+++ .sql.new 2016-04-29 12:37:15.662355200 -0400 | |
@@ -1,2 +1 @@ | |
-WHERE Squirrels=1 | |
-AND Humans=1 | |
+WHERE Humans=1 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment