MySQL 随机查询10条数据

1.rand()

  随机查询10条数据:ORDER BY RAND() LIMIT 10

	<select id="getRecommendProductList" resultType="com.xxx.xxx.front.response.ConvertRecommendProductList">
        select
        	*
        from
        	store_product
        where
        	1=1
        ORDER BY RAND() LIMIT 10
    </select>

相关推荐

  1. MySQL 随机查询10数据

    2024-01-24 15:36:03       55 阅读
  2. mysql 分组取前10数据

    2024-01-24 15:36:03       41 阅读
  3. MySQL随机获取几记录

    2024-01-24 15:36:03       48 阅读
  4. 11. Mysql查询

    2024-01-24 15:36:03       63 阅读

最近更新

  1. docker php8.1+nginx base 镜像 dockerfile 配置

    2024-01-24 15:36:03       94 阅读
  2. Could not load dynamic library ‘cudart64_100.dll‘

    2024-01-24 15:36:03       100 阅读
  3. 在Django里面运行非项目文件

    2024-01-24 15:36:03       82 阅读
  4. Python语言-面向对象

    2024-01-24 15:36:03       91 阅读

热门阅读

  1. element-ui 打包流程源码解析——babel 相关

    2024-01-24 15:36:03       64 阅读
  2. Ubuntu 18.04 dns掉配置的问题解决

    2024-01-24 15:36:03       61 阅读
  3. vue3中几种封装让后端传参请求方式

    2024-01-24 15:36:03       50 阅读
  4. 边缘计算:在挑战与机遇的浪潮中破浪前行

    2024-01-24 15:36:03       54 阅读
  5. 边缘计算的挑战和机遇

    2024-01-24 15:36:03       59 阅读
  6. Dart/Flutter工具模块:the_utils

    2024-01-24 15:36:03       63 阅读
  7. 《设计模式的艺术》笔记 - 备忘录模式

    2024-01-24 15:36:03       53 阅读