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

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

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

—— 完 ——
  • 在Widows操作系统下,要获取某个网络开放端口所对应的应用程序信息,可以使用命令()。
  • Host "localhost " is not allowed to connect to mysql server解决办法
  • C# .NET 使用正则获取a标签href属性
  • C#连接SQLite数据库连接字符串
  • 自动清理SQLServer ErrorLog错误日志避免太大
  • 计算机取证主要是对电子证据的获取、分析、归档和描述的过程
  • 消防灭火系统施工中,不需要管道冲洗的是()。
  • Teradata和CouchDB的区别
  • 内存占用高,你的数据库该如何优化?
  • SQL分页查询的几种写法

© CopyRight 2014~2024 薄学网.