mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-21 09:10:48 +00:00
Example fixed
This commit is contained in:
parent
1e4b90f351
commit
299fc2604a
@ -13,6 +13,7 @@ Creates a user defined function from a lambda expression. The expression must co
|
||||
CREATE FUNCTION name AS (parameter0, ...) -> expression
|
||||
```
|
||||
A function can have an arbitrary number of parameters.
|
||||
|
||||
There are a few restrictions.
|
||||
|
||||
- The name of a function must be unique among user defined and system functions.
|
||||
@ -43,7 +44,7 @@ Result:
|
||||
A [conditional function](../../../sql-reference/functions/conditional-functions.md) is called in a user defined function in the following query:
|
||||
|
||||
```sql
|
||||
CREATE FUNCTION parity AS (n) -> if(number % 2, 'odd', 'even');
|
||||
CREATE FUNCTION parity AS (n) -> if(n % 2, 'odd', 'even');
|
||||
SELECT number, parity(number) FROM numbers(3);
|
||||
```
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user