17.07.27 Oracle

 

 * 操作数据

  DML 语句 数据操作语言,在现有的结构上对表里的数据进行操作,增删查改

  DDL  会改变表的数据结构

 

查找,行和列的交叉点:

select  list_name,salary    对列的筛选

from  employees        表

where department-id=90;         对行的筛选

 

distinct  把重复的值筛选出去

例:select  distinct  department_id from employess;  

 

字符串必须用单引号

字符串区分大小写

日期类型的值叫格式名

 

where  lower ( last_name )='lee'     lower函数 ,当分不清大小写的时候使用,但是索引失效

 

select  sysdate  from  dual;      查看日期,dual是一个空表

 

vi   .bash_profile  其中可以更改时间格式

 

通配符:% 代表任意字符

     _   代表任意单字符

  \  是一个转义符,屏蔽后面字符的特殊含义

  例:where  job_id  like  '%\_MAN'  escape  '\';

 

posted on 2017-07-27 19:40  zhang_x  阅读(105)  评论(0编辑  收藏  举报

导航