思路:

先将取出的值随机排序,然后在随机排序的每次取第一条的结果

举例如下:


select * from(select t.code fromTBIZOPS_PROVINCE  t ORDER BY DBMS_RANDOM.RANDOM())where rownum < 2;
select * from (select t.code from TBIZOPS_CITY t wheret.province_id = '13' ORDER BY DBMS_RANDOM.RANDOM()) where rownum< 2 ;
select * from (select t.code from TBIZOPS_County t wheret.province_id = '13' and t.city_id = '1304'ORDER BYDBMS_RANDOM.RANDOM()) where rownum < 2 ;

最新文章

  1. grape动态PHP结构(一)——目录结构与配置文件
  2. python高级之网络编程
  3. Python基础知识之认识字符串
  4. STL-next permutation
  5. 算法:最大子数组own
  6. Convolution and Deconvolution
  7. Java中报错No enclosing instance of type caiquan is accessible. Must qualify the allocation with an enclosing instance of type caiquan (e.g. x.new A() where x is an instance of caiquan).
  8. Node.js权威指南 (10) - Node.js中的错误处理与断言处理
  9. #if defined 的意思?
  10. Ffplay视频播放流程
  11. Asp.net网站的简单发布
  12. springmvc图片上传(兼容ie8以上,实时预览)
  13. 【Docker】Docker概述
  14. 【Python 07】汇率兑换1.0-2(基本元素)
  15. mysql 性能监控
  16. 对负载均衡的理解及nginx负载均衡的配置
  17. EF框架搭建小总结--CodeFirst代码优先
  18. CentOS下安装高版本GCC
  19. SqlServer数据库分离与附加
  20. PyQt5 应用在 TeamViewer 下无法使用全屏模式

热门文章

  1. 虽然我们可能不想对元素应用3D变换,可我们一样可以开启3D引擎
  2. 【Android】12.0 UI开发(三)——列表控件ListView的简单实现2
  3. winform判断chrome是否正在最前端运行
  4. 鼠标事件-拖拽(不能拖出窗口的div)
  5. C语言——顺序表插入、删除、定位运算算法
  6. C++:关于委托类
  7. ArrayList排序Sort()方法(转)
  8. Python 爬虫 根据属性值关键字搜索标签
  9. Log4j的配置文件
  10. python 类属性及限制