We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Summary
If Controls conditional branching. Unlike most systems, ClickHouse always evaluate both expressions then and else. Syntax:
SELECT if(cond, then, else)
Example:
Query:
SELECT if(1, 2+2, 2+6);
Result:
┌─plus(2, 2)─┐ │ 4 │ └────────────┘
SELECT if(0, 2+2, 2+6);
┌─plus(2, 6)─┐ │ 8 │ └────────────┘
Reference: https://clickhouse.tech/docs/en/sql-reference/functions/conditional-functions/#if
The text was updated successfully, but these errors were encountered:
/assignme
Sorry, something went wrong.
zhyass
Successfully merging a pull request may close this issue.
Summary
If
Controls conditional branching. Unlike most systems, ClickHouse always evaluate both expressions then and else.
Syntax:
Example:
Query:
Result:
Query:
Result:
Reference:
https://clickhouse.tech/docs/en/sql-reference/functions/conditional-functions/#if
The text was updated successfully, but these errors were encountered: