Tuesday 10 January 2012

Select random rows in SQL server


USE [DBName]

SELECT TOP 1 ID,targetLink,addPath,add_type

from dbo.advertisements

where targetDevices=@targetDevices

ORDER BY newid()


Mohammad Abu Hmead

No comments:

Post a Comment