摘要:        
SQL> create table test3 2 (tid number, 3 tname varchar2(20), 4 hiredate date default sysdate);表已创建。SQL> insert into test3(tid,tname) values(1,'Tom');已    阅读全文
posted @ 2017-04-18 16:22
酸奶加绿茶
阅读(261)
评论(0)
推荐(0)
        
            
        
        
摘要:        
create table emp_bk as (select * from emp where 1=2);这句就是复制源表的结构    阅读全文
posted @ 2017-04-18 16:03
酸奶加绿茶
阅读(1301)
评论(0)
推荐(0)
        
            
        
        
摘要:        
注意: CLOB 是字符型,BLOB是二进制 都是大字段类型。    阅读全文
posted @ 2017-04-18 15:32
酸奶加绿茶
阅读(126)
评论(0)
推荐(0)
        
            
        
        
摘要:        
SQL> select count(*) Total, 2 sum(decode(to_char(hiredate,'yyyy'),'1980',1,0)) "1980", 3 sum(decode(to_char(hiredate,'yyyy'),'1981',1,0)) "1981", 4 sum(decode(to_char(hi...    阅读全文
posted @ 2017-04-18 15:26
酸奶加绿茶
阅读(220)
评论(0)
推荐(0)
        
            
        
        
只有注册用户登录后才能阅读该文。    阅读全文
posted @ 2017-04-18 14:04
酸奶加绿茶
阅读(2)
评论(0)
推荐(0)
        
            
        
        
摘要:        
查询10和20号部门的员工 SQL> 1. select * from emp where deptno in (10,20); SQL> 2. select * from emp where deptno=10 or deptno=20; SQL> 3. 集合运算 SQL> select * from emp where deptno=10 SQL> 加上 SQL> ...    阅读全文
posted @ 2017-04-18 10:15
酸奶加绿茶
阅读(233)
评论(0)
推荐(0)
        
            
        
        
摘要:        
wm_concat(varchar2) 组函数    阅读全文
posted @ 2017-04-18 10:05
酸奶加绿茶
阅读(173)
评论(0)
推荐(0)
        
            
        
        
摘要:        
1.行号是个伪列,rownum 永远按照默认的顺序生成 2.rownum 只能使用< <= 不能使用> >=(原因是oracle数据库是行式数据库,像盖楼一样,没有第一层就排不到第二层) 分页    阅读全文
posted @ 2017-04-18 09:46
酸奶加绿茶
阅读(829)
评论(0)
推荐(0)
        

浙公网安备 33010602011771号