Created
October 16, 2019 04:37
-
-
Save y2k-shubham/2b4165ab358eedbaa296e3c5992e4935 to your computer and use it in GitHub Desktop.
SQL-query-keyword-capitalization
This file contains 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
Find regex: `(?<!\w)(insert|is|into|with|as|select|from|where|between|and|or|distinct|case|when|then|else|end|on|null|not|inner|outer|full|join|left|right|group|by|order|limit|in)(?!\w)` | |
Replace regex: `\U$1\E` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
given a SQL query, above replacement will capitalize it's keywords like 'select' -> SELECT', 'group by' -> GROUP BY' etc.