电脑爱好者,提供IT资讯信息及各类编程知识文章介绍,欢迎大家来本站学习电脑知识。 最近更新 | 联系我们 RSS订阅本站最新文章
电脑爱好者
站内搜索: 
当前位置:首页>> oracle>>oracle数据库中sql基础:SQL的语法:

oracle数据库中sql基础:SQL的语法

来源:网络 | 2008-4-27 | (有3545人读过)

1) 连接号:|| 
   
  2) 把两个字符连接起来 
  eg:select game_card_type_id||name from game_card_type; 
   
  3) select distinct dept_id,title from emp: 对多个字段的唯一 
   
  4) order by desc(降序) 
  order by asc(升序) 
   
  5) where column is (not) null 
   
  6) like ‘_a%’  _表示一个字符。%表示多少字符 
  like ‘%x\_y%’ escape ‘\’:显示包括x_y的字符 
   
  7) where table1.column(+)=table2.column 
  place the operator on the side of the join where there is no value to join to. 
   
  8) 联接类型: 
  equijoin:等式查询 
  non_equijoin:不等式查询 
  self:自己和自己建立关联 
  out join:where a.column=b.column(+) 
  可以用的操作符是:’=’,’and’,不可以用’or’,’in’ 
   
  9) COUNT 函数所用的列包含空值时,空值行被忽略。 
   
  10) where 后的in any all 的区别 
  in :等于子查询的任何一个数 
  any :与子查询的每一个值相比 
  只要比其中一个大(小)就可以了 
  all:与子查询的所有值相比要比所有的的都大(小) 
  !=ALL作用跟NOT IN 一样 
oracle热门文章排行
网站赞助商
购买此位置

 

关于我们 | 网站地图 | 文档一览 | 友情链接| 联系我们

Copyright © 2003-2024 电脑爱好者 版权所有 备案号:鲁ICP备09059398号