OpenSearch/docs/reference/sql/language/syntax/commands
Marios Trivyzas b8a13de20f
SQL: Implement TOP as an alternative to LIMIT (#57428) (#57507)
Add basic support for `TOP X` as a synonym to LIMIT X which is used
by [MS-SQL server](https://docs.microsoft.com/en-us/sql/t-sql/queries/top-transact-sql?view=sql-server-ver15),
e.g.:

```
SELECT TOP 5 a, b, c FROM test
```

TOP in SQL server also supports the `PERCENTAGE` and `WITH TIES`
keywords which this implementation doesn't.

Don't allow usage of both TOP and LIMIT in the same query.

Refers to #41195

(cherry picked from commit 2f5ab81b9ad884434d1faa60f4391f966ede73e8)
2020-06-02 10:53:42 +02:00
..
describe-table.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 19:00:26 +02:00
index.asciidoc Restructure the SQL Language section to have proper sub-sections (#43007) 2019-06-11 12:39:59 +03:00
select.asciidoc SQL: Implement TOP as an alternative to LIMIT (#57428) (#57507) 2020-06-02 10:53:42 +02:00
show-columns.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 19:00:26 +02:00
show-functions.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 19:00:26 +02:00
show-tables.asciidoc SQL: document the use of a filter on _routing (#52355) 2020-02-14 19:00:26 +02:00