+ 2
Why to write all sql statements in upper case
4 Réponses
+ 13
It was meant for readability. Before, SQL was written in plain-text editors (no syntax/code highlighting) and keywords needed to be differentiated for better readability and maintenance.
SELECT column_name FROM table_name WHERE column_name = column_value
vs
select column_name from table_name where column_name = column_value
See the difference? The first word in each line told the reader exactly what was going on (selecting something from somewhere where something).
But now with syntax-highlighting, there's really no point. But it IS a best practice and allows SQL developers to be on the same page/style while developing.
-Stackoverflow
+ 5
Each language is different.
To print a line
C++
cout<<endl;
Java
System.out.println();
C#
Console.WriteLine();
Ruby
puts.
I dunno any more.
Also SQL is case insensitive.
+ 1
Every language has their own style for the syntax. Thus, we can understand that this language is different then others. It doesn't make us confused.
+ 1
I think as long as your coding is concise, readable, reproducable and can be understood by others case of text is a personal choice. i prefer to use upper case for my SELECT FROM etc and a new line to separate at each clause.