dual表是一个虚拟表,用来和select语句一起使用。
1、查看当前用户
select  user from dual
2、用来调用系统函数
select to_char(sysdate,'yyyy-mm-dd hh24:mi:ss') from dual ----得到当前系统时间

select SYS_CONTEXT('USERENV','TERMINAL') from dual;--获得主机名

select SYS_CONTEXT('USERENV','language') from dual;--获得当前locale

select dbms_random.random from dual;--获得一个随机数

3、得到序列的下一个值或当前值,用下面语句

select your_sequence.nextval from dual;--获得序列your_sequence的下一个值

select your_sequence.currval from dual;--获得序列your_sequence的当前值

4、可以用做计算器

select 7*9 from dual;

5、查空值
select  null extattrid,null extattrname from dual union all select  extattrid,extattrname from VExtAttrDetail where extattrsn in (22)

最新文章

  1. mongodb 性能篇
  2. chrome浏览器开发者工具之同步修改至本地
  3. OpenCV图像的二值化
  4. SQLServer 关闭自增长,插入数据
  5. 移动端 移动web屏幕适配方案 随不同宽度的屏幕而改变
  6. HW7.1
  7. XUTils框架的学习(三)
  8. Python爬虫实战(二)
  9. 需要考虑的9个SEO实践
  10. git - 简明指南(转)
  11. Magento首页显示产品
  12. python 字符串 string
  13. ubuntu下python跑任务输出到文件中遇到的一些问题(输出重定向)
  14. C#获取日期的星期名称
  15. ajax 200 4 parseerror 的错误
  16. (Review cs231n)loss function and optimization
  17. jdk1.8使用的url和driverName的改变
  18. Vue实例data对象里允许有哪些类型数据
  19. Lerning Entity Framework 6 ------ Using a commandInterceptor
  20. Struts2中 radio标签的详细使用方法

热门文章

  1. 多大开始玩EV3
  2. 感知开源的力量-APICloud Studio开源技术分享会
  3. MOGRE学习笔记(2) - MOGRE基础知识总结
  4. UCenter uc_user_synlogin同步登陆返回值为空(NULL)的解决办法 及 ucenter原理
  5. WebDriver中启动不同的浏览器
  6. [GDAL]GEOS和Proj4编译
  7. PostgreSQL 对字段大小写敏感
  8. 堡垒机 paramiko代码
  9. UISlide属性
  10. UIButton详解