Random Row

  • Thread starter Thread starter Luis E Valencia
  • Start date Start date
Count the rows, generate a random # from 1 to X
Get row x.
Mind you you really should get the unique ID's, put them into an array/list,
generate the random from there.
 
if you are using sql server

select top 1 * from mytable
order by newid()

I think you should be able to find plenty of articles on how to display data from a database.
 
Back
Top