重複の可能性:
T-SQL キーワードに大文字を使用する正当な理由はありますか?
簡単な質問です。個人的には、大文字の文字列よりも小文字の文字列の方が読みやすいと思います。SQLの大文字と小文字を区別する古い/人気のあるフレーバーはありますか?
参考のため:
select
this.Column1,
case when this.Column2 is null then 0 else this.Column2 end
from dbo.SomeTable this
inner join dbo.AnotherTable another on this.id = another.id
where
this.Price > 100
対。
SELECT
this.Column1,
CASE WHEN this.Column2 IS NULL THEN 0 ELSE this.Column2 END
FROM dbo.SomeTable this
INNER JOIN dbo.AnotherTable another ON this.id = another.id
WHERE
this.Price > 100
私には前者の方がはるかに読みやすいように思えますが、後者の方がより頻繁に見られます。