Outline ·
[ Standard ] ·
Linear+
Do you capitalize when write SQL?, despite of MS SQL is case insensitive
TSk town shit
|
Jun 4 2019, 05:41 PM, updated 5y ago
|
|
Hi Sifu, i noticed most of the learning site use capital letter in SQL statement, do you all also write in capital letter everytime when it comes to the SQL keyword? what does it matter since MS SQL is case insensitive? For example: CODE alter table dbo.items add itemSold1999 int
ALTER TABLE dbo.items ADD itemSold1999 INT This post has been edited by k town shit: Jun 4 2019, 05:42 PM Attached thumbnail(s)
|
|
|
|
ketnave
|
Jun 4 2019, 06:01 PM
|
|
QUOTE(k town shit @ Jun 4 2019, 05:41 PM) Hi Sifu, i noticed most of the learning site use capital letter in SQL statement, do you all also write in capital letter everytime when it comes to the SQL keyword? what does it matter since MS SQL is case insensitive? For example: CODE alter table dbo.items add itemSold1999 int
ALTER TABLE dbo.items ADD itemSold1999 INT Yes. Just because you can, does not mean you should.
|
|
|
|
TSk town shit
|
Jun 4 2019, 06:20 PM
|
|
QUOTE(ketnave @ Jun 4 2019, 05:01 PM) Yes. Just because you can, does not mean you should. pardon me, I dont understand, you mean I should capitalize them? thanks
|
|
|
|
ketnave
|
Jun 4 2019, 07:42 PM
|
|
QUOTE(k town shit @ Jun 4 2019, 06:20 PM) pardon me, I dont understand, you mean I should capitalize them? thanks Sorry, I wasn't clear enough, I do capitalize SQL reserved words.
|
|
|
|
PATAR
|
Jun 4 2019, 10:19 PM
|
Getting Started
|
No, I don't . And i 'm lazy with ";" too. Then whenever I have to do something on an Oracle system once in a while I wonder why my code don't work.
|
|
|
|
malleus
|
Jun 4 2019, 10:37 PM
|
|
it does make your SQL statements easier to read, which is a good plus point.
|
|
|
|
ragk
|
Jun 7 2019, 03:32 PM
|
|
i do, for the sake of readability
|
|
|
|
lolzcalvin
|
Jun 9 2019, 01:00 PM
|
|
no lmao, guilty pleasure
|
|
|
|
bumpo
|
Jun 10 2019, 10:24 AM
|
|
rather than case, i find breaking the query to separate lines + indentation to be far more effective at increasing readability and supportability
|
|
|
|