1.参考文献

(388条消息) CAST()函数用法_普通网友的博客-CSDN博客_cast函数

(388条消息) oracle生成标准uuid,Oracle 生成uuid方法_Ms 陈的博客-CSDN博客

(388条消息) oracle的exists用法总结_见怪不怪丶的博客-CSDN博客_oracle exists

(388条消息) Oracle中extract()函数_宜春的博客-CSDN博客_oracle extract

sql实战

sql数据库常用函数简单记录-LMLPHP

EXISTS EXTRACT(unit FROM date)  CAST

#EXIST函数简介,子查询可查询出来数据则执行前面的主sql方法,反之则不执行数据
select * from admin where id=2    and EXISTS (select * from admin where id='1')

#EXTRACT函数用于取出日期的年或者月或者日  和year month函数作用没啥区别
select EXTRACT(year from borndate) as year1 from beauty

#取出日期中的月份
select MONTH(borndate) from beauty

#将字段转换为指定的字段类型
select cast(borndate as char) from beauty

 

12-09 15:07