If you’re using MS SQL, you can try:
SELECT TOP 1 * FROM table_Name ORDER BY unique_column DESC
More Related Contents:
- SQL Server dynamic PIVOT query?
- SQL Server – Best way to get identity of inserted row?
- SQL Server Process Queue Race Condition
- Is the NOLOCK (Sql Server hint) bad practice?
- SQL Server 2005 Pivot on Unknown Number of Columns
- SQL – Subtracting a depleting value from rows
- Get all table names of a particular database by SQL query?
- Stored procedure or function expects parameter which is not supplied
- Pass table as parameter into sql server UDF
- SQL Server Convert Varchar to Datetime
- There are no primary or candidate keys in the referenced table that match the referencing column list in the foreign key
- OPTION (RECOMPILE) is Always Faster; Why?
- SQL server query to get the list of columns in a table along with Data types, NOT NULL, and PRIMARY KEY constraints
- How to set variable from a SQL query?
- Case in Select Statement
- Split function in SQL Server 2008
- SQL – Query to get server’s IP address
- Remove numbers from string sql server
- T-SQL How to create tables dynamically in stored procedures?
- What is the equivalent of ‘describe table’ in SQL Server?
- Modify Default value in SQL Server
- Unordered results in SQL
- Using PIVOT in SQL Server 2008
- Produce DISTINCT values in STRING_AGG
- sql group by only rows which are in sequence
- Function in SQL Server 2008 similar to GREATEST in mysql?
- ORDER BY items must appear in the select list if SELECT DISTINCT is specified
- Query times out from web app but runs fine from management studio
- Add a column to existing table and uniquely number them on MS SQL Server
- What is the most appropriate data type for storing an IP address in SQL server? [duplicate]