ISLOGICAL
检查值是逻辑值(TRUE
还是 FALSE
),并返回 TRUE
还是 FALSE
。
语法
ISLOGICAL(<value>)
参数
术语 | 定义 |
---|---|
value |
要测试的值。 |
返回值
如果值为逻辑值,则 TRUE
;FALSE
除 TRUE
ORFALSE
以外的任何值。
言论
在计算列或行级别安全性 (RLS) 规则中使用时,不支持在 DirectQuery 模式下使用此函数。
例
以下三个示例显示了 ISLOGICAL的行为。
//RETURNS: Is Boolean type or Logical
= IF(ISLOGICAL(true), "Is Boolean type or Logical", "Is different type")
//RETURNS: Is Boolean type or Logical
= IF(ISLOGICAL(false), "Is Boolean type or Logical", "Is different type")
//RETURNS: Is different type
= IF(ISLOGICAL(25), "Is Boolean type or Logical", "Is different type")