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的更多相关文章

  1. 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 ...

  2. 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 ...

  3. Course Machine Learning Note

    Machine Learning Note Introduction Introduction What is Machine Learning? Two definitions of Machine ...

  4. shell learning note

      shell learning note MAIN="/usr/local/" # 变量大写 STATUS="$MAIN/status" # 美元符加字符串是 ...

  5. 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 ...

  6. Oracle Study Note : Tablespace and Data Files

    1.how to create a tablespace that employs the most common features create tablespace tb_name #create ...

  7. 2014/09/30 Learning Note

    Vbird Linux: Vim Learning: http://linux.vbird.org/linux_basic/0310vi.php Bash Shell: http://linux.vb ...

  8. [Angular2] @Ngrx/store and @Ngrx/effects learning note

    Just sharing the learning experience related to @ngrx/store and @ngrx/effects. In my personal opinio ...

  9. Machine Learning Note Phase 1( Done!)

    Machine Learning 这是第一份机器学习笔记,创建于2019年7月26日,完成于2019年8月2日. 该笔记包括如下部分: 引言(Introduction) 单变量线性回归(Linear ...

随机推荐

  1. saltstack源码-启动2-parsers.py选项初始化1

    class MasterOptionParser(OptionParser, ConfigDirMixIn, MergeConfigMixIn, LogLevelMixIn, RunUserMixin ...

  2. RobotFrameWork--selenium2模拟chrome的user agent

    ${options}= Evaluate sys.modules['selenium.webdriver'].ChromeOptions() sys, selenium.webdriver ${opt ...

  3. UI:数据的解析XML与JSON

    XML  和  JSON 语言  本篇博客来自互联网参考 XML 和 JSON 的互相转化 有属性的转化为对象,无属性的转化为字符串 节点的顺序性不可逆,XML有顺序,JSON 无顺序 XML 和 J ...

  4. UI:UITextView

    #import "MainViewController.h" @interface MainViewController () <UITextViewDelegate> ...

  5. LayUI table表格控件 如何显示 对象中的属性(针对Mybatis的级联查询--一对一情况)

    1.entity如下: 2.Mybatis的Mapper.xml文件如下 <resultMap id="BaseResultMapPlus" type="dicIt ...

  6. Sencha Cmd使用

    通过Sencha Cmd辅助开发基于ExtJS4 MVC的项目 http://www.ineeke.com/archives/1465/ ExtJS4.2:Sencha Cmd 介绍:http://w ...

  7. UVa 1363 Joseph's Problem (数论)

    题意:给定 n,k,求 while(i <=n) k % i的和. 析:很明显是一个数论题,写几个样例你会发现规律,假设 p = k / i.那么k  mod i = k - p*i,如果 k ...

  8. 线程Coroutines 和 Yield(转)

    之前一直很纠结这个问题,在网上找到了这篇文章,给大家分享下: 第一种方法:    void Start()     {         print("Starting " + Ti ...

  9. UOJ #206. 【APIO2016】Gap【交互题】

    参考:https://blog.csdn.net/clover_hxy/article/details/70767653 人生第一次交互题...不是很难但是思维和传统题差别挺大的(以及并不会本地测试= ...

  10. 洛谷P3246 [HNOI2016]序列

    传送门 题解 //minamoto #include<iostream> #include<cstdio> #define ll long long using namespa ...