Curious inconsistent behaviour from SQL Server in windowed function clauses?

后端 未结 2 1023
时光说笑
时光说笑 2021-01-12 10:27

Whilst asking another question, I discovered that SQL Server (happens both in 2005 and 2008) seems to have strange inconsistent behaviour when dealing with CASE

2条回答
  •  礼貌的吻别
    2021-01-12 10:59

    The evaluations in your first example will never change.

    You are comparing a constant to a constant which will constantly result in a constant.

    1=1 will always be TRUE.
    1=0 will always be FALSE.

提交回复
热议问题