> ## Documentation Index
> Fetch the complete documentation index at: /documents/llms.txt
> Use this file to discover all available pages before exploring further.

# sleep

> Delays query execution for a specified number of seconds and returns whether the sleep completed without interruption.

Delays the execution of an operation for a specified period of time (in seconds) and returns a BOOLEAN value to indicate whether the sleep is completed without interruption. `1` is returned if the sleep is completed without interruption. Otherwise, `0` is returned.

## Syntax

```Haskell theme={null}
BOOLEAN sleep(INT x);
```

## Parameters

`x`: the duration for which you want to delay the execution of an operation. It must be of the INT type. Unit: seconds. If the input is is NULL, NULL is returned immediately without sleeping.

## Return value

Returns a value of the BOOLEAN type.

## Examples

```Plain Text theme={null}
select sleep(3);
+----------+
| sleep(3) |
+----------+
|        1 |
+----------+
1 row in set (3.00 sec)

select sleep(NULL);
+-------------+
| sleep(NULL) |
+-------------+
|        NULL |
+-------------+
1 row in set (0.00 sec)
```

## Keywords

SLEEP, sleep


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.