Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

select last row mysql

SELECT
  (SELECT * FROM tableName ORDER BY col1 LIMIT 1)        AS first,
  (SELECT * FROM tableName ORDER BY col1 DESC LIMIT 1)   AS last
;
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #select #row #mysql
ADD COMMENT
Topic
Name
2+8 =