17

who the fuck names their table aliases a, b, c, d... in a long query

Comments
  • 2
    Someone with good memory, apparently
  • 5
    Orders o
    Order_items oi
    Products p

    It works if it makes sense.

    - - -

    Orders a
    Order_items b
    Products c

    Don't make sense.
  • 2
    @C0D4 if you put things that annoy people in your sql you will usually be able to find out who 'borrowed' your code
  • 0
    @noneshallpass people borrow sql?
  • 1
    @C0D4 in a startup where everyone is a business analyst individuals can incorporate parts of statements or whole queries.
  • 0
    Hibernate
  • 1
  • 0
    @12bitfloat someone who dosen't give f cause left the co shortly after the commit dates
  • 3
    ACCOUNT, BUSINESS, COMPANY and DATA_IMPORT? I do. Why?
  • 0
    proc precompiler names host variables in long query as :b0, :b1, ..., b43, ...
  • 0
    I agree with @C0D4

    As long as it’s unique and understandable..

    Customer c join address a on c.addressId = a.id

    Would rename it if it goes into production code though. Some idiots out there don’t understand shit.
  • 1
    @netikras thats an acceptable example, unfortunally not mathes my case
  • 1
    @just8littleBit

    I think memorable is important at least while its being written.

    I have tried to use ordered letter in the past, only to forget what is what down the road.

    Still, if its ordered, at least when you get to z you know you have too many references.
  • 1
    Last week I had to convert sql code into Spark scala (not my code) and one query went from a-m. Constantly looking back to see what a letter should actually be isn't fun.

    Using an accroym is easy and makes so much more sense.

    Name thing properly people!
  • 1
    Have a naming convention for how table names are transformed in code. Someone has to maintain that code after you rant on here about how shit your company is and that you're leaving
  • 1
    My company DBA team do this shit always 😡
Add Comment