Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

randomly selecting rows

 
richa parab
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi..
I want to select row randomly from table and select attribute randomly from that row, where that attribute should be numeric. And want to set seed.
after searching i got how to select row randomly as---

SELECT * FROM automobile3 ORDER BY NEWID()

automobile3 is table name. So how should i write a query for that. Can any one help??
 
Jim Venolia
Ranch Hand
Posts: 248
2
Chrome Linux VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Google "sql select random row attribute"
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic