Oracle learning note
oracle SQL
select 'para1' || 'para2' as "para" must ""
select count(*),c.id,c.name count(*) not use with "group by" count total rows number,otherwise "count(*)" always equal 1
from table t
where c.name in ('test1','test2') group by c.name,c.id having count() show data group by "count(*)","id","name",selected fields must equal to group by fields except count(*) (select a.p1 as ap,b.p2 as bp from tablea a join tableb b on a.id = b.id) tablec combine a&b to c select (sysdate - c.date) *24 *60 as d,round(123.456, 0) r return 123,返回小数点后面0位
from test
where nvl(arg,00)<> 23; 代表如果前面的arg的值为null那么返回的值为后面的00,oracle不等于标准写法<> select distinc * from table t where 1<>1 只取table结构,不取值
select * from table t where 1=1 用于动态创建sql语句以至于不会报错 trunc(123.45),trunc(sysdate,'mm') 函数截取时不进行四舍五入2017/1/1 18:00:00 会显示为2017/1/1
round(123.456, 2) 函数截取时进行四舍五入
to_char(sysdate,'mon')
substr(para,-1,2) 截取para从最后1个字母开始数的2个字母
to_date('2017-08-09','yyyy-MM-dd')
sign(p1-p2) 函数根据某个值是0、正数还是负数,分别返回0、1、-1
select a.* from A a where exists (select b.* from B b) 适合B表比A表数据大的情况,因为exists()会执行A.length次,它并不缓存exists()结果集 if v_name='vickey' then
dbms_output.put_line('success!');
else
dbms_output.put_line('failed');
end if;
decode(filed,ifval1,thensetval1,ifval2,thensetval2,...,else)
Oracle learning note的更多相关文章
- Learning Note: SQL Server VS Oracle–Database architecture
		
http://www.sqlpanda.com/2013/07/learning-note-sql-server-vs.html This is my learning note base on t ...
 - Learning note for Binding and validation
		
Summary of my learning note for WPF Binding Binding to DataSet. when we want to add new record, we s ...
 - Course Machine Learning Note
		
Machine Learning Note Introduction Introduction What is Machine Learning? Two definitions of Machine ...
 - shell learning note
		
shell learning note MAIN="/usr/local/" # 变量大写 STATUS="$MAIN/status" # 美元符加字符串是 ...
 - Oracle Study Note : Users and Basic Security
		
1. view the default user account SQL> select username from dba_users; 2. lock all users and set t ...
 - Oracle Study Note : Tablespace and Data Files
		
1.how to create a tablespace that employs the most common features create tablespace tb_name #create ...
 - 2014/09/30 Learning Note
		
Vbird Linux: Vim Learning: http://linux.vbird.org/linux_basic/0310vi.php Bash Shell: http://linux.vb ...
 - [Angular2] @Ngrx/store and @Ngrx/effects learning note
		
Just sharing the learning experience related to @ngrx/store and @ngrx/effects. In my personal opinio ...
 - Machine Learning Note Phase 1( Done!)
		
Machine Learning 这是第一份机器学习笔记,创建于2019年7月26日,完成于2019年8月2日. 该笔记包括如下部分: 引言(Introduction) 单变量线性回归(Linear ...
 
随机推荐
- 说说Java观察者模式
			
观察者模式是对象行为模式中的一种,在平时项目中经常被用来解耦对象之间的依赖. 观察者模式定义了对象间的一种一对多的依赖关系,当一个对象的状态发生改变时,所有依赖它的对象都得到通知并自动更新.别名:De ...
 - LR:HTML-based script和URL-based script方式录制的区别
			
转http://www.cnblogs.com/xiaojinniu425/p/6275257.html 一.区别: 为了更加直观的区别这两种录制方式,我们可以分别使用这两种方式录制同一场景(打开百度 ...
 - Codeforces Round #209 (Div. 2) C - Prime Number
			
传送门 题意 给出n个数及x,求 \[\frac{\sum _{i=1}^n x^{a_1+a_2+...+a_{i-1}+a_{i+1}+...a_n}}{\prod_{i=1}^n x^{a_i} ...
 - bzoj 2809: [Apio2012]dispatching【dfs序+主席树】
			
可并堆就可以,但是想复健一下主席树. 考虑枚举管理者,然后选忍者的时候在子树中贪心的从小到大选.做成dfs序就是选区间内和小于等于k的最多点.可以用主席树,查询的时候在主席树上二分即可 这里注意,为了 ...
 - Mysql根据数据库的时间字段到点更新另外的状态。
			
转载:https://blog.csdn.net/xingfuzhijianxia/article/details/53727820 需求如下: 添加一条提醒,被提醒人在提醒时间未到达的时候收不到此提 ...
 - spring boot 项目发布运行
			
1. maven install 发布jar包 2. java -jar webservice.jar 启动jar包
 - Linux下UDP简介及程序设计
			
一.UDP简介 UDP(User Datagram Protocol),用户数据报协议,是OSI参考模型中一种无连接的传输层协议,提供面向事务的简单不可靠信息传送服务.UDP提供了无连接通信,且不对传 ...
 - HDFS执行getDatanodeReport时权限不足的解决办法
			
通过JAVA获取HDFS的getDatanodeReport方法时,报权限不足的错误信息. org.apache.hadoop.ipc.RemoteException(org.apache.hadoo ...
 - AJPFX关于构造器的总结
			
构造器 构造器定义 构造器作用 构造器特点 构造器修饰符 默认构造器 构造器重载 构造器和一般函数的区 ...
 - Spring Cloud是什么?
			
[学习笔记] 3)Spring Cloud是什么?马克-to-win@马克java社区:i)Spring Cloud是一个微服务框架,Spring Cloud基于微服务基础框架Netflix进行了up ...