| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to fetch random rows for every time you query
Hi ,
I constructed an MS access query in java to retrieve the rows in random. The code snipet Connection con = DriverManager.getConnection( database ,"",""); Statement s = con.createStatement() strQry = "select top 10 S_No , Rnd(S_No) as exp from Questions order by Rnd(S_No) desc" ; s.execute(strQry) ; This is the query I used to fetch the records in random. When i tried executing this code several times it fetches only the same set of records each time. Actually my requirement is , for every time you query this , it should fetch different records. Please help me in this. Thanks in advance Arun kumar |
![]() |
| Viewing: Tutorialized Forums > Databases > MS Access > How to fetch random rows for every time you query |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|