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
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
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.
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.
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...
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.
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.
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.
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.
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]
Lowercase for one-off manual queries, uppercase otherwise.
That's an odd humiliation ritual you got there, bro.
Alternating.
sElEcT
Sarcastic Query Language (SQL)
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.
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]
I absolutely loathe that indentation.
Putting the comma after the line-break feels especially wrong in a comma and linebreak separated list.
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 ...
thats a good argument.
But on an aesthetic level I just don't like it.
Thanks anon.
i switched from upper to lower a few years ago. it makes me feel less like im writing in COBOL or GWBASIC or something.
It's ok, you will grow out of your rebellious phase and return to tradition eventually.
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
no
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
AWAYS UPPERCASE BECAUSE ORACLE IS SOMETIMES CASE-SENSITIVE
FRICK ORACLE
ONLY LOWERCASE
CapitalizingLettersWithoutSpacesSoTheEditorCanAutocompleteWithTab
LET'SFRICKINGGO!
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.
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.
Only braindead morons write SQL in lowercase
call me a tard then
UPPER CASE MOTHER FRICKER
Yes.
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...
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.
I only use uppercase for Oracle and MSSQL. They are moronic and need to be shouted at to get them to do their jobs.
Always upper case, you can pretend you're a boomer yelling at your DB to execute the queries faster.
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.
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.
*case insensitive
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.
>Do you IQfyuys write SQL
No, I use an ORM like normal people.