Skip to content
New issue

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

docs: improved en version of sql/dql/limit #2226

Merged
merged 4 commits into from
Jul 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 6 additions & 5 deletions docs/en/reference/sql/dql/LIMIT_CLAUSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Limit Clause

The Limit clause is used to limit the number of results. OpenMLDB currently only supports Limit accepting one parameter, indicating the maximum number of rows of returned data;
The Limit clause is used to limit the number of results. OpenMLDB currently only supports one parameter to limit the maximum number of rows of returned data.

## Syntax

Expand All @@ -16,17 +16,18 @@ SELECT ... LIMIT ...
```

## Boundary Description
For the standalone version, `LIMIT` is supported in all conditions. For the cluster version, the execution modes, which support this clause, are shown below.

| `SELECT` Statement Elements | Offline Mode | Online Preview Mode | Online Request Mode | Note |
|:-----------------------------------------------------------|--------------|---------------------|---------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------|
| LIMIT Clause | **``✓``** | **``✓``** | **``✓``** | The Limit clause is used to limit the number of results. OpenMLDB currently only supports one parameter to limit the maximum number of rows of returned data. |

| SELECT statement elements | state | direction |
| :------------- | -------------------- | :----------------------------------------------------------- |
| LIMIT Clause | Online Serving is not supported | The Limit clause is used to limit the number of results. OpenMLDB currently only supports Limit accepting one parameter, indicating the maximum number of rows of returned data; |

## Example

### SELECT with LIMIT

```SQL
-- desc: SELECT Limit
SELECT t1.COL1 c1 FROM t1 limit 10;
```