adspace


How to select random rows from a table?

Answer Posted / 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       View All Answers


Please Help Members By Posting Answers For Below Questions

Is inner join faster than left join?

1276


What is your daily office routine?

2346


How do I remove duplicates in two columns?

1186


what is schema? : Sql dba

1146


If a cursor is open, how can we find in a pl/sql block?

1238


what is bcp? When does it used? : Sql dba

1055


what are the advantages of sql ? : Sql dba

1142


define sql insert statement ? : Sql dba

1098


what is collation? : Sql dba

1229


what is dbms? : Sql dba

1061


Is primary key clustered index?

1019


Can we rollback truncate?

1074


what are all the common sql function? : Sql dba

1131


how to escape special characters in sql statements? : Sql dba

1113


how to use regular expression in pattern match conditions? : Sql dba

1113