In mysql, how does one randomly extract database records and help a friend to change asp-related products? it is displayed that the first 10 products of the current category need to be randomly read.
Randomly extract database records from mysql
-------------------------------------------------------------------------------- View plaincopy to clipboardprint?
Select * from tablename order by rand () limit 10
Select * from tablename order by rand () limit 10sqlserver randomly extracts database records
-------------------------------------------------------------------------------- View plaincopy to clipboardprint?
Select top 10 * from tablename order by NEWID ()
Select top 10 * from tablename order by NEWID () Access randomly extracts database records
-------------------------------------------------------------------------------- View plaincopy to clipboardprint?
SELECT top 10 * FROM tablename order by Rnd (FId)
SELECT top 10 * FROM tablename order by Rnd (FId) FId: ID field name of your current table