Example of three valued logic in SQL Server

后端 未结 5 1016
难免孤独
难免孤独 2020-12-16 05:02

I understand that SQL uses three valued logic but I am having trouble understanding how to use this in practice, especially why TRUE || NULL = True and FA

5条回答
  •  清歌不尽
    2020-12-16 05:34

    To use a nullable variable you just need to check NULL conditions (using IS NULL) before checking the value.

    e.g. IF @a IS NOT NULL AND @a = 1

提交回复
热议问题