Javatpoint Logo
Javatpoint Logo

MySQL last function

MySQL last function is used to return the last value of the selected column.

Syntax:

MySQL last function example

Consider a table "officers" having the following data.

mysql last() 1

Execute the following query:

This query will return the last officer_name ordering by officer_id.

Output:

mysql last() 2

Return the last officer_name ordering by officer_name:

Output:

mysql last() 3
Next TopicMySQL Comments





Youtube For Videos Join Our Youtube Channel: Join Now

Feedback


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA