“SQL obtiene la última identificación” Código de respuesta

SQL Seleccione la última ID

#Where the the column name is "ID" and table name is "tablename" and ID naming is increasing numerical value.
SELECT * 
FROM tablename
WHERE ID = (
    SELECT MAX(ID) 
  	FROM Table)
Kwams

SQL obtiene la última identificación

SELECT MAX(id) FROM <tablename>
Old-fashioned Oystercatcher

SQL Seleccione la última ID

SELECT
  (SELECT * FROM tableName ORDER BY col1 LIMIT 1)        AS first,
  (SELECT * FROM tableName ORDER BY col1 DESC LIMIT 1)   AS last
;
VasteMonde

Cómo obtener el último elemento SQL

	Select Distinct names.xyz
       From nameList names
       LEFT JOIN nameList idNum
       ON idNum.xyz > names.xyz AND idNum.xyz IS NOT NULL
       WHERE idNum.xyz IS NULL
Obedient Ocelot

Respuestas similares a “SQL obtiene la última identificación”

Preguntas similares a “SQL obtiene la última identificación”

Más respuestas relacionadas con “SQL obtiene la última identificación” en Sql

Explore las respuestas de código populares por idioma

Explorar otros lenguajes de código