How to select random rows from a table?



How to select random rows from a table?..

Answer / Anoo Sonker

To select random rows from a table, use the RAND() function in combination with the ORDER BY clause. For example: SELECT * FROM tablename ORDER BY RAND() LIMIT number_of_rows.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More SQL PLSQL Interview Questions

What is the purpose of a sql?

1 Answers  


what is Difference between Having and Where clause?

5 Answers   IBM,


Is delete faster than truncate?

1 Answers  


What is an Integrity Constraint?

4 Answers  


what are the advantages of sql ? : Sql dba

0 Answers  


How do you create a db file?

1 Answers  


What are the events on which a database trigger can be based?

1 Answers  


We have a CURSOR then we need BULK COLLECT?

1 Answers  


Name the operator which is used in the query for pattern matching?

1 Answers  


Compare sql & pl/sql

1 Answers  


Source is Sales Table: Sno Prod Sales Sales_Amount 1 A 10 2000 2 A 20 1000 3 C 10 3000 4 D 30 4000 5 A 20 1000 Target : Sales_Count T_Sales_Amt Sales_Count(A) T_Sales_Amt(A) 90 11000 50 4000 In single query, pls tell me.

5 Answers   CGI,


What is form and report?

1 Answers  


Categories