Do you?

Do you IQfyuys write SQL in UPPERCASE or lowercase?

Mike Stoklasa's Worst Fan Shirt $21.68

Thalidomide Vintage Ad Shirt $22.14

Mike Stoklasa's Worst Fan Shirt $21.68

  1. 4 weeks ago
    Anonymous

    I just capitalize the first letter of most stuff

    Select top 10 * From dbo.[Billing Report 2]
    Where [Paid by Client] Is Null or [Paid by Client] = 'N'
    Order by [Client Number]

    • 4 weeks ago
      Anonymous

      Lowercase for one-off manual queries, uppercase otherwise.

      That's an odd humiliation ritual you got there, bro.

      • 4 weeks ago
        Anonymous

        Alternating.
        sElEcT

        • 4 weeks ago
          Anonymous

          Sarcastic Query Language (SQL)

  2. 4 weeks ago
    Anonymous
  3. 4 weeks ago
    Anonymous

    most of the time i don't give a shit/go all lower case.
    When i'm feelin' fancy, I format it like this

    SELECT
    a, b, c, ....
    FROM
    table1, table2
    WHERE
    condition1
    and condition2
    ODER BY
    a

    Writing the "section headers", if you will, in all caps and eveything else indented and lowercase.

    • 4 weeks ago
      Anonymous

      here let me fix that syntax for you

      SELECT t1.[A]
      ,t1.[B]
      ,t2.[C]
      , ....
      FROM table1 t1
      JOIN table2 t2 ON t2.[t1_ID] = t1.[ID]
      WHERE 1 = 1
      AND condition1
      AND condition2
      ODER BY t1.[A]

      • 4 weeks ago
        Anonymous

        I absolutely loathe that indentation.
        Putting the comma after the line-break feels especially wrong in a comma and linebreak separated list.

        • 4 weeks ago
          Anonymous

          it has it's benefits
          you can easily comment out a field, and it doesn't require you to think about the commas

          SELECT a,
          b,
          --c, <--- Breaks the query due to trailing comma
          FROM ...

          SELECT a
          ,b
          --,c <--- No issues
          FROM ...

          • 4 weeks ago
            Anonymous

            thats a good argument.
            But on an aesthetic level I just don't like it.

          • 4 weeks ago
            Anonymous

            Thanks anon.

  4. 4 weeks ago
    Anonymous

    i switched from upper to lower a few years ago. it makes me feel less like im writing in COBOL or GWBASIC or something.

    • 4 weeks ago
      Anonymous

      It's ok, you will grow out of your rebellious phase and return to tradition eventually.

      • 4 weeks ago
        Anonymous

        its okay, you will realize that people are entitled to their own methods and quit assuming everyone must look/act/jack off exactly as you do eventually

  5. 4 weeks ago
    Anonymous

    no

  6. 4 weeks ago
    Anonymous

    only keywords, but most of the time Im using an inhouse query builder and dumping its output and copy paste modifying it to see what I need to modify and then retroactively put that back into the query builder

  7. 4 weeks ago
    Anonymous

    AWAYS UPPERCASE BECAUSE ORACLE IS SOMETIMES CASE-SENSITIVE
    FRICK ORACLE

  8. 4 weeks ago
    Anonymous

    ONLY LOWERCASE

  9. 4 weeks ago
    Anonymous

    CapitalizingLettersWithoutSpacesSoTheEditorCanAutocompleteWithTab
    LET'SFRICKINGGO!

  10. 4 weeks ago
    Anonymous

    I prefer uppercase but I often use lowercase because I'm lazy. I always use uppercase when I write it directly in PHP.
    I also put the commas at the beginning of the line, that is very useful.

  11. 4 weeks ago
    Anonymous

    As long as the text editor gives me a color indicating it understands the keyword, I don't care.
    >b-b-but you must chose
    I just need the computer to understand what I want, nothing more. I don't care about your feelings.

  12. 4 weeks ago
    Anonymous

    Only braindead morons write SQL in lowercase

    • 4 weeks ago
      Anonymous

      call me a tard then

  13. 4 weeks ago
    Anonymous

    UPPER CASE MOTHER FRICKER

  14. 4 weeks ago
    Anonymous

    Yes.

  15. 4 weeks ago
    Anonymous

    All the boomers I work with have lowercase everything SQL scripts.
    Personally I uppercase all reserved keywords and lowercase the rest.
    But, when in Rome...

  16. 4 weeks ago
    Anonymous

    UPPERCASE FOR KEYWORDS
    lowercase for identifiers
    And careful with getting the indentation right. It doesn't matter for trivial inserts or queries, but when things get complicated it's vital.
    Also, check if your client language supports multiline strings. It helps a lot with readability.

  17. 4 weeks ago
    Anonymous

    I only use uppercase for Oracle and MSSQL. They are moronic and need to be shouted at to get them to do their jobs.

  18. 4 weeks ago
    Anonymous

    Always upper case, you can pretend you're a boomer yelling at your DB to execute the queries faster.

  19. 4 weeks ago
    Anonymous

    Uppercase because of tradition and readability. Everything else is snake case. However, I can't decide if I want to start Pascal-casing my table names or keep them snake case.

    • 4 weeks ago
      Anonymous

      Avoid any capitals in any kind of schema object name or you'll inevitably run into issues when you write sql for a db that hasn't been configured to be case sensitive. Having to escape everything is a pain in the ass.

      • 4 weeks ago
        Anonymous

        *case insensitive

  20. 4 weeks ago
    Anonymous

    I couldn't tell you, it's all reflex at this point. I think I tend to uppercase keywords and camel case everything else, although there's likely a lot of inconsistency.

  21. 4 weeks ago
    Anonymous

    >Do you IQfyuys write SQL
    No, I use an ORM like normal people.

Your email address will not be published. Required fields are marked *