首页
学习
活动
专区
工具
TVP
发布
社区首页 >问答首页 >为什么我要大写我的SQL关键字?

为什么我要大写我的SQL关键字?

提问于 2018-03-07 00:03:05
回答 2关注 0查看 846

简单的问题。我个人发现一串小写字符比一串大写字符更可读。是一些旧的/流行的SQL大小写敏感或什么的味道?

以供参考:

代码语言:javascript
复制
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

代码语言:javascript
复制
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

前者似乎对我来说更易读,但我更经常看到后者。

回答

和开发者交流更多问题细节吧,去 写回答
相关文章

相似问题

相关问答用户
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档