“SQL Select Last ID” Réponses codées

SQL Select Last 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 Get Last ID

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

SQL Select Last ID

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

Réponses similaires à “SQL Select Last ID”

Questions similaires à “SQL Select Last ID”

Plus de réponses similaires à “SQL Select Last ID” dans Sql

Parcourir les réponses de code populaires par langue

Parcourir d'autres langages de code