Skip to main content

Questions tagged [style]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
-2 votes
1 answer
102 views

Why should I write SQL code with uppercased keywords? [closed]

Almost any literature writes SQL keywords and functions in UPPERCASE. e.g. SELECT column_1, MAX(column_b), * FROM table AS alias; What is the reason for this? Is it because of a better readability? ...
2 votes
1 answer
216 views

Common Table Expression syntax

Considering a query with CTEs: WITH cte_0 AS ( SELECT SUM(col_0) FROM table_0 WHERE condition_00 AND condition_01 ), cte_1 AS ( SELECT SUM(...
1 vote
2 answers
53 views

Name of SQL programming style where KEYWORDS | CRITERIA are justified to centering line

Is there a name for this kind of SQL programming style? --Courtesy of Markus Winand of modern-sql.com/ SELECT * FROM (SELECT cities.* , ROW_NUMBER() OVER(PARTITION BY country ORDER BY ...
15 votes
5 answers
17k views

Does it make sense to use SQL Server's bracket notation in hand written code?

Code generators tend to be simpler when they generate output using the new Microsoft bracket notation ([]) for nearly everything. When I first saw it, I though wow a reincarnation of the somewhat ...
5 votes
2 answers
257 views

Are there other sites forbidding SQL developer to use c style comments?

My personal opinion is that C style comments should not be used by sql developers. The problem with C Style comments is, that they do not nest. C Style comments are one of the lifesavers for the ...
8 votes
2 answers
1k views

Is this a new common pattern in Oracle Where exists ( Select NULL FROM...)?

Years ago, it was common to write where exists (Select * from some_table where some_condition) Last year I noticed that many t-sql scripts switched to using the number 1 instead of the star where ...