Sql Query to retrieve data using Order By in Random Order


To retrieve the record in random order from the existing created table. Then we can use an ' ORDER BY ' Clause with RANDOM() Or RAND() Function.

RAND() is used in MySQL workbench. But RANDOM() will not work.

Enter - Select * from table_name;
SQL Query
SELECT * FROM employees ORDER BY RANDOM();
Output