Dino Geek, try to help you

How to use LIMIT clause in MariaDB?


The LIMIT clause in MariaDB is used to limit the number of records returned by the SELECT statement.

Syntax:

SELECT column\_name(s)
FROM table\_name
WHERE condition
LIMIT number;

The following parameters are used in the LIMIT clause.

column\_name(s) – the names of the columns want to select.

table\_name – the name of the table where you want to retrieval the data.

condition – The selection conditions.

number – The number of records you want to get.

Example:

SELECT \*
FROM Employees
LIMIT 5;

This will return the first 5 records from the Employees table.

If you want to specify a specific range of records, you can use the LIMIT clause with two arguments like so:

SELECT \*
FROM Employees
LIMIT 5,10;

This will return records from 6 to 15 (5 is the starting index and 10 is the number of records) from the Employees table.

Note: The first record of the result in MariaDB has an index of 0, not 1.


Simply generate articles to optimize your SEO
Simply generate articles to optimize your SEO





DinoGeek offers simple articles on complex technologies

Would you like to be quoted in this article? It's very simple, contact us at dino@eiki.fr

CSS | NodeJS | DNS | DMARC | MAPI | NNTP | htaccess | PHP | HTTPS | Drupal | WEB3 | LLM | Wordpress | TLD | Domain name | IMAP | TCP | NFT | MariaDB | FTP | Zigbee | NMAP | SNMP | SEO | E-Mail | LXC | HTTP | MangoDB | SFTP | RAG | SSH | HTML | ChatGPT API | OSPF | JavaScript | Docker | OpenVZ | ChatGPT | VPS | ZIMBRA | SPF | UDP | Joomla | IPV6 | BGP | Django | Reactjs | DKIM | VMWare | RSYNC | Python | TFTP | Webdav | FAAS | Apache | IPV4 | LDAP | POP3 | SMTP

| Whispers of love (API) | Déclaration d'Amour |






Legal Notice / General Conditions of Use