我有一个包含引号的数据库,即Mysql“id,user_who_posted,quote,year,author”我想让它显示id的随机引用。这可能吗?
答案 0 :(得分:4)
SELECT id,user_who_posted,quote,year,author FROM table ORDER BY RAND() LIMIT 1
答案 1 :(得分:2)
SELECT id,user_who_posted,quote,year,author
FROM table
ORDER BY RAND()
LIMIT 1
的更多randoms