Hacker News new | ask | show | jobs
by Semiapies 2821 days ago
I never uppercase the SQL keywords. If it's more than a one-liner select statement, I format it so the indentation tells me what's going on.

To throw out a tossed-off example:

    select
        P.full_name, A.full_address, AT.type as address_type_name
    from
        People as P
        inner join
        Addresses as A on P.address_id=A.id
    where
        P.deleted is null
1 comments

That's also my preferred approach. When formatting your code like this, the caps don't really offer an advantage anymore.

Plus, it's more comfortable to type as well.