C-Sharp | Java | Python | Swift | GO | WPF | Ruby | Scala | F# | JavaScript | SQL | PHP | Angular | HTML
MySQL first functionThe MySQL first function is used to return the first value of the selected column. Here, we use limit clause to select first record or more. Syntax: SELECT column_name FROM table_name LIMIT 1; MySQL first function exampleTo SELECT FIRST element: Consider a table named "officers", having the following data. Execute the following query: SELECT officer_name FROM officers LIMIT 1; Output: To SELECT FIRST two records SELECT officer_name FROM officers LIMIT 2; Output:
Next TopicMySQL last
|