---
title: "db2随机查询数据"
author: "koreyoshi"
date: "2012-07-27T15:04:23Z"
tags: ["DB2", "数据", "查询", "随机"]
categories: ["数据库"]
slug: "db2"
draft: false
lastmod: "2012-07-27T15:04:23Z"
id: 1609318
url: "https://koreyoshi.iteye.com/blog/1609318"
---

db2 随机查询数据  
select * from CC\_PRC\_PAGE\_line  fetch first 1 rows only  
sqlserver 随机查询数据  
select top   1  *   from  tablename   order   by   newid()  
oracle 随机查询数据  
select \*from (select \*from t order by dbms\_random.value) where rownum&lt;10;