MySQL Wildcards

MySQL Wildcards

MySQL Aliases

MySQL Aliases

MySQL Data Types

MySQL Data Types

MySQL Interview Questions

MySQL Interview Questions and Answers


MySQL max() Function

The MySQL first() function returns the first value from specific field with the help of LIMIT clause to select first record. It is used when you need to get first record from fields value.

MySQL FIRST FUNCTION Syntax

To find very first record from specific field in a table, use the following syntax:

Syntax

SELECT col1 
FROM tablename
LIMIT 1;

Parameters:

tablename: The table name from which you want to fetch records.

col1: The column or field name that will be return.

MySQL FIRST FUNCTION example

The following MySQL, fetching very first record from the column name "firstName" in the "tblCustomerLoan" table:

Example

SELECT firstName
FROM tblCustomerLoan
LIMIT 1;

Note:

In the above example, we are fetching first record from column "firstName" in tblCustomerLoan" table.

You can use MySQL Command Line Client to find first record from the specified fields in the table. It will look like this: