Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 selecting random rows from database

Author  Topic 

simply_genius
Starting Member

1 Post

Posted - 2007-03-23 : 00:48:24
how can i select random rows from the database??
my website is being developed in asp and i need to retrive top 6 rows from the databse randomly, everytime a user comes to my site.
i am using MS ACCESS for storing my database.

thanks.

Kristen
Test

22859 Posts

Posted - 2007-03-23 : 07:40:11
"how can i select random rows from the database??"

The most common way to do this is to ORDER BY a function that returns a GUID. I don't know if you can do this in Access though? In SQL Server it would be

ORDER BY NewID()

Kristen
Go to Top of Page
   

- Advertisement -