Closed rikirenz closed 7 years ago
$database->select("account", "user_name", [
"AND" => [
"user_name" => "foo",
"LIMIT" => 10
]);
Are you using Oracle or MS SQL Server?
Because of most people use MySQL/SQLite/PostgreSQL with Medoo, no body write code for TOP at present.
Here is the Oracle way to fetch first 10 rows in SQL
SELECT * FROM user FETCH FIRST 10 ROWS ONLY;
And the second 10 rows
SELECT * FROM user OFFSET 10 ROWS FETCH NEXT 10 ROWS ONLY;
I heard that Microsoft SQL Server supports this way since ver 2012.
The patch for oracle limit is in commit f9023a98c64
I need to select only the first 10 rows for a query. But there is not any kind of information about the TOP clause in the documentation. Which is the right way to select a specific number of rows wit Medoo?