---
title: is true operator
description: Learn the syntax of the is true operator  of the SQL language in Databricks.
canonical_url: https://docs.databricks.com/aws/en/sql/language-manual/functions/istrue
---

# `is true` operator

**Applies to:** ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks SQL ![check marked yes](https://docs.databricks.com/aws/en/images/icons/check.png) Databricks Runtime

Tests whether `expr` is `true`.

## Syntax

```
expr is [not] true
```

## Arguments

* `expr`: A BOOLEAN or STRING expression.

## Returns

A BOOLEAN.

If `expr` is a STRING of case-insensitive value `'t'`, `'true'`, `'y'`, `'yes'`, or `'1'` it is interpreted as a BOOLEAN `true`.
If the value is `'f'`, `'false'`, `'n'`, `'no'`, or `'0'` it is interpreted as a BOOLEAN `false`.

Any other non-NULL string results in a [CAST\_INVALID\_INPUT](https://docs.databricks.com/aws/en/error-messages/cast-invalid-input-error-class.md) error.

If `expr` is `NULL` the result is `false`.

If `not` is specified this operator returns `true` if `expr` is `true` or `NULL` and `false` otherwise.

If `not` is not specified the operator returns `true` if `expr` is `false` and `false` otherwise.

## Examples

```sql
> SELECT true is true;
 true

> SELECT 't' is true;
 true

> SELECT false is true;
 false

> SELECT NULL is true;
 false

> SELECT 'valid' is true;
 Error: CAST_INVALID_INPUT

> SELECT true is not true;
 false

> SELECT 't' is not true;
 false

> SELECT false is not true;
 true

> SELECT NULL is not true;
 true
```

## Related functions

* [`isnotnull` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/isnotnull.md)
* [`isnull` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/isnull.md)
* [`is null` operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/isnullop.md)
* [`isnan` function](https://docs.databricks.com/aws/en/sql/language-manual/functions/isnan.md)
* [`is false` operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/isfalse.md)
