从数据库表中随机获取N条记录的SQL语句

2022-02-23 10:38:13 码农 1603

Oracle:

select * from (select * from tableName order by dbms_random.value) where rownum < N
MS SQLServer:

select top N * from tableName order by newid()
My Sql:

select * from tableName order by rand() limit N

—— 完 ——
  • Table '' is marked as crashed and should be repaired 解决方法
  • MySQL授予远程连接相应权限
  • 【201305-单选38】在 GIS 中组织属性数据,应用较多的数据库模型是:
  • SQL 通配符
  • 数据操作与查询语句
  • SQL ASIN() 函数
  • 如果注册会计师已获取有关控制在期中运行有效的审计证据,下列有
  • Sql Server 修改数据库名称
  • 下列竣工技术资料中,属于施工记录资料的有()
  • TCGA、ICGC、GTEx数据库都是啥?

© CopyRight 2014~2024 薄学网.