MySQL database - How to select several random records from a table.

How to select several random records from a table.
Sometimes it is necessary to select several random records from a database.
This task can be achieved by using built-in function RAND () using LIMIT clause and ORDER BY clause.
Suppose you have a table SoftFernNews from which you want to select 10 random rows containing Titles and IDs every time when user visits your home page.
Solution:
select NewsID, NewsTitle
from SoftFernNews
order by rand() limit 10

More similar topics with SQL tips:
Oracle database - How to select several random records from a table
Database DB2 - How to select several random records from a table
MySQL database - How to select several random records from a table
PostgreSQL - How to select several random records from a table
Microsoft SQL Server - How to select several random records from a table