Eine Einführung in
SQL
Select a record with the latest date
SQLite
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to SQLite
none
DB2
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to DB2
none
MS Access
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to MS Access
none
PostgreSQL
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to PostgreSQL
none
Oracle
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to Oracle
none
MS SQL Server
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to MS SQL Server
none
MySQL
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to MySQL
none
Sybase
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to Sybase
none
Mimer SQL
There may be several records with the same date.
There are two steps...
(a) Find the latest date
(b) Select records with that date
With a nested select we can do both of these in one go.
SELECT * FROM totp where wk= (SELECT MAX(wk) FROM totp)
Specific to Mimer SQL
none