RAC
real application clusters
实时应用集群
优点:
1、Load Balance 负载均衡
2、Fail Over 失败迁移
spool d:\1.txt spool off 开始记录 结束记录
show user
select * from tab //查看用户下的表
desc emp //查看表结构
host cls //清屏
//行宽
show linesize
set linesize 90
//列宽
col ename format a8
sql优化
1、用列名代替*
sql中的null
1、包含null的表达式都是null
2、null !=null =====>应该写成 where comm is null
distinct 作用于后边所有的列
NVL( string1, replace_with)
功能:如果string1为NULL,则NVL函数返回replace_with的值,否则返回string1的值,如果两个参数都为NULL ,则返回NULL。
mysql中拼接字符串
concat("hello"," world")
其中不用写from
直接
select concat("hello"," world")
就OK
oracle中
select ename||'的薪水是'||sal
from emp
在oracle中''来表示日期和字符
""列的别名
oracle连接的端口是1521
isqlplus:5560 相当于网页版的sqlplus
oracle企业管理器 :https://localhost:1158/em
字符串大小写敏感
日期格式敏感
查看默认的日期格式
select * from v$nls_parameters;
更改
alter session | system (范围) set xxxx=“yyyy-mm-dd” ;
比较运算符
between and
in
like
is null