(select * from w_dishes where w_dishes_type_id=1 order by rand() limit 1 ) UNION (select * from w_dishes where w_dishes_type_id=2 order by rand() limit 3 )
联合查询 和 一个表随机查询某几条记录
最新推荐文章于 2023-12-06 22:57:23 发布
(select * from w_dishes where w_dishes_type_id=1 order by rand() limit 1 ) UNION (select * from w_dishes where w_dishes_type_id=2 order by rand() limit 3 )