SQL Programming Random Message
when we see a message on an application that will change when the refresh, then we think how to use it
SQL provides convenience through
SELECT RAND ();
example:
SELECT * FROM table ORDER BY RAND ();
SELECT * FROM table ORDER BY RAND () LIMIT 3;
SELECT * FROM table WHERE conditions ORDER BY RAND () LIMIT 3;
No comments:
Post a Comment
Let's us sharing