DECLARE @ID INT SET @ID = (SELECT TOP 1 MyColumn FROM MyTable ORDER BY MyColumn) PRINT @ID
--assuming ur value type is varchar declare @a varchar(50) SELECT TOP 1 @a=MyColumn FROM MyTable ORDER BY MyColumn SELECT @a
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)