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

# `or` 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

Returns the logical `OR` of `expr1` and `expr2`.

## Syntax

```
expr1 or expr2
```

## Arguments

* `expr1`: A BOOLEAN expression.
* `expr2`: A BOOLEAN expression.

## Returns

A BOOLEAN.

## Examples

```sql
> SELECT true or false;
 true
> SELECT false or false;
 false
> SELECT true or NULL;
 true
> SELECT false or NULL;
 NULL
```

## Related functions

* [`and` predicate](https://docs.databricks.com/aws/en/sql/language-manual/functions/and.md)
* [`or` operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/or.md#)
* [`not` operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/not.md)
* [`!` (bang sign) operator](https://docs.databricks.com/aws/en/sql/language-manual/functions/bangsign.md)
