In MySQL I can use the RAND() function, is there any alternative in SQLite 3?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
using random():
EDIT (by QOP): Since the docs on SQLite Autoincremented columns states that:
The above is only true if you don’t have a
INTEGER PRIMARY KEY AUTOINCREMENTcolumn (it will still work fine withINTEGER PRIMARY KEYcolumns). Anyway, this should be more portable / reliable:ROWID,_ROWID_andOIDare all aliases for the SQLite internal row id.