ITPub博客

首页 > 数据库 > Oracle > 数据库开发基础---常见面试题

数据库开发基础---常见面试题

原创 Oracle 作者:lff1530983327 时间:2015-03-04 14:28:02 0 删除 编辑

create table a (t varchar2(20))

alter table a add  s varchar2(20);

alter table a drop column  s;

---删除子分区   

 alter table 分区表名

drop partition  子分区名;

delete  from t a1 where  a1.rowid not in (select max(a2.rowid) from t a2 group  by a2.xx);commit;

Select Count(Decode(deptno, 20, '1', Null)) cnt_20,

       Sum(Decode(deptno, 20, sal, 0)) sum_sal_20,

       Count(Decode(deptno, 30, '1', Null)) cnt_30,

       Sum(Decode(deptno, 30, sal, 0)) sum_sal_30

  From emp

 Where ename Like 'SMITH%'

   and deptno in (20, 30);

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/30018455/viewspace-1447969/ ,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2014-11-12

  • 博文量
    72
  • 访问量
    49752