我在php中使用sql,但是,结果没有显示:
test(id, name, type, category_id);
我的sql是:
select top 10( id, name) from test order by NewId()
如何修复它
答案 0 :(得分:1)
此post的示例:
SELECT * FROM `table_name` ORDER BY RAND() LIMIT 10;
答案 1 :(得分:0)
SELECT * from test ORDER BY RAND() LIMIT 10
希望有所帮助
答案 2 :(得分:0)
select top 10( id, name) from test
ORDER BY RAND()
答案 3 :(得分:0)
SELECT
id,
name
FROM test
ORDER BY RAND()
LIMIT 0,10