select identity(int,1,1) UniqueID, a.* from yourtable a where fld = 'test' having UniqueID = 1You might have to play with the having (or even where) towhere identity( int, 1, 1 ) = 1 AND fld = 'test'or having identity( int, 1,1 ) = 1