Without any further information, which Database etc the best we can do is something like
Sql Server
SELECT TOP 1 * FROM Table ORDER BY ID DESC
MySql
SELECT * FROM Table ORDER BY ID DESC LIMIT 1
More Related Contents:
- Efficiently convert rows to columns in sql server
- T-SQL split string
- How can I get column names from a table in SQL Server?
- Conditional WHERE clause in SQL Server
- How can I select the first day of a month in SQL?
- Multi-statement Table Valued Function vs Inline Table Valued Function
- SQL Server Insert if not exists
- GROUP BY to combine/concat a column [duplicate]
- Select statement to find duplicates on certain fields
- How to set table name in dynamic SQL query?
- Copy data into another table
- Rename column SQL Server 2008
- Compare DATETIME and DATE ignoring time portion
- How do I see active SQL Server connections?
- EXISTS vs JOIN and use of EXISTS clause
- UPDATE if exists else INSERT in SQL Server 2008 [duplicate]
- Why is a UDF so much slower than a subquery?
- Cannot use a CONTAINS or FREETEXT predicate on table or indexed view because it is not full-text indexed
- Alternate of lead lag function in SQL Server 2008
- How do I edit a table in order to enable CASCADE DELETE?
- UNIX_TIMESTAMP in SQL Server
- How can I convert a Sql Server 2008 DateTimeOffset to a DateTime
- SQL Server SELECT LAST N Rows
- The transaction log for the database is full
- Generate random int value from 3 to 6
- Add emoji / emoticon to SQL Server table
- How to execute a stored procedure inside a select query
- Using CASE Statement inside IN Clause
- Single or multiple databases
- SQL Unpivot multiple columns Data