“Selecione Last Row Mysql” Respostas de código

mysql Obtenha a última fila

SELECT fields FROM table ORDER BY id DESC LIMIT 1;
Cute Crayfish

MySQL Selecione as últimas 10 linhas

SELECT * FROM tableName ORDER BY col1 DESC LIMIT 10;
VasteMonde

Selecione First e Last Row Mysql

(select *from DemoTable694 order by EmployeeId ASC LIMIT 1)
UNION
(select *from DemoTable694 order by EmployeeId DESC LIMIT 1);
Harendra

MySQL Selecione a última consulta

select `COLUMN_NAME_1`, `COLUMN_NAME_2` from `TABLE_NAME` ORDER BY id DESC LIMIT 1;
Smiling Starling

Selecione 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
;
VasteMonde

Selecione as últimas n linhas mysql

SELECT * FROM (
    SELECT * FROM table ORDER BY id DESC LIMIT 50
) sub
ORDER BY id ASC
Ankur

Respostas semelhantes a “Selecione Last Row Mysql”

Perguntas semelhantes a “Selecione Last Row Mysql”

Mais respostas relacionadas para “Selecione Last Row Mysql” em Sql

Procure respostas de código populares por idioma

Procurar outros idiomas de código