OpenSearch/docs/reference/sql/language
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
..
syntax SQL: Implement TOP as an alternative to LIMIT (#57428) (#57507) 2020-06-02 10:53:42 +02:00
data-types.asciidoc QL: constant_keyword support (#53241) (#53602) 2020-03-16 18:06:31 +02:00
index.asciidoc Docs: Documentation for the upcoming SQL support of frozen indices (#41863) 2019-05-23 21:16:16 +03:00
indices.asciidoc Restructure the SQL Language section to have proper sub-sections (#43007) 2019-06-11 12:39:59 +03:00