mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-10 01:25:21 +00:00
Merge pull request #62469 from peter279k/add_uptime_func_usage
Document function `uptime`
This commit is contained in:
commit
84e3e64778
@ -916,6 +916,34 @@ Returns the larger value of a and b.
|
||||
Returns the server’s uptime in seconds.
|
||||
If executed in the context of a distributed table, this function generates a normal column with values relevant to each shard. Otherwise it produces a constant value.
|
||||
|
||||
**Syntax**
|
||||
|
||||
``` sql
|
||||
uptime()
|
||||
```
|
||||
|
||||
**Returned value**
|
||||
|
||||
- Time value of seconds.
|
||||
|
||||
Type: [UInt32](/docs/en/sql-reference/data-types/int-uint.md).
|
||||
|
||||
**Example**
|
||||
|
||||
Query:
|
||||
|
||||
``` sql
|
||||
SELECT uptime() as Uptime;
|
||||
```
|
||||
|
||||
Result:
|
||||
|
||||
``` response
|
||||
┌─Uptime─┐
|
||||
│ 55867 │
|
||||
└────────┘
|
||||
```
|
||||
|
||||
## version()
|
||||
|
||||
Returns the current version of ClickHouse as a string in the form of:
|
||||
|
Loading…
Reference in New Issue
Block a user