5 ms·
Do we need to use caps for SQL keywords? My understanding is that it served a purpose back in the days of monochrome screens, but modern IDEs colour the keywor
by accnumnplus1 8y ago
Do we need to use caps for SQL keywords? My understanding is that it served a purpose back in the days of monochrome screens, but modern IDEs colour the keywords so caps are now redundant. Though I don't use caps even without colouring, I find them just a nuisance.
- deleted 8y ago[deleted]
- da_chicken 8y agoNo, not at all. SQL is case agnostic unless you're talking about field collations or, in many systems, object names. It's also largely whitespace agnostic. Many RDBMSs will handle this just fine: select*from"MyTable"where"column"=3
- accnumnplus1 8y agoAh, the whitespace agnostic didn't even occur to me!
- nicoburns 8y agoDepends on your IDE. My editor only picks up SQL in strings sometimes.
- tejtm 8y agoI got over all caps SQL keywords a very long time ago. If anything, I think it hurts readability while taking (me) longer to write.
- yoklov 8y agoI prefer them because they make grepping for SQL code easier. Also syntax coloring inside strings is not common.