zoukankan      html  css  js  c++  java
  • Oracle初级第一天

    oracle卸载
    运行regedit,删除HKEY_LOCAL_MACHINESOFTWAREORACLE
    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServices,滚动 这个列表,删除所有Oracle入口。 
    HKEY_LOCAL_MACHINESYSTEMCurrentControlSetServicesEventlogApplication, 删除所有Oracle入口。
    
    -- 创建表空间BwfBook
    create tablespace BwfBook
    logging
    datafile 'D:appAdministratororadataorclBwfBook.dbf'
    size 20M
    autoextend on
    next 10M maxsize 1024M
    extent management local;
    
    -- 创建临时表空间BwfBook_temp
    create temporary tablespace BwfBook_temp
    tempfile 'D:appAdministratororadataorclBwfBook_temp.dbf'
    size 20M
    autoextend on
    next 10M maxsize 1024M
    extent management local;
    
    -- 创建用户bookAdmin,并指定默认表空间和临时表空间
    create user bookAdmin 
    identified by bwf123 
    default tablespace BwfBook 
    temporary tablespace BwfBook_temp;
    
    -- 给用户bookAdmin授权
    grant connect, resource, dba to bookAdmin;
    
    select * from tbl_book;
    
    insert into tbl_book values (23, '西游记2', '吴承恩', '25.5', default, 1001);
    
    select t.*, t.rowid from TBL_BOOK t
    
    
    select to_char(to_date('2017-3-1', 'yyyy-mm-dd'), 'hh') from dual;
    
    select sysdate - to_date('2015-3-1', 'yyyy-mm-dd') from dual;
    
    select last_day(sysdate) from dual;
    
    select months_between(sysdate, to_date('2017-3-1 23:11:33', 'yyyy-mm-dd hh24:mi:ss') )from dual;
    
    select next_day(sysdate, '星期二') from dual;
    
    select trunc(to_date('2017-3-9 21:09:13', 'yyyy-mm-dd hh24:mi:ss')) + (interval '2:23:15' hour to second) from dual;
    
    select NVL('zhangsan@qq.com', '暂无') from dual;
    
    select sum(bprice) from bookAdmin.tbl_book;
    
    select * from myemp;
    create synonym myemp for scott.emp;
    drop synonym myemp;
    
    create sequence seq_test
    start with 10000
    increment by 1;
    
    
    select seq_test.currval from dual;
    
    create trigger trig_book_ai before insert on tbl_book for each row
    begin
      select seq_test.nextval into :new.bid from dual;
    
    end;
  • 相关阅读:
    启动容器失败:endpoint with name cop already exists in network host.
    docker定时任务执行脚本报错:the input device is not a TTY
    期末总结
    云图学习
    豆瓣top250
    爬取学习
    爬取图片
    爬取学习bs4
    爬取学习 屠戮盗版天堂
    爬取学习
  • 原文地址:https://www.cnblogs.com/lifusen/p/7284194.html
Copyright © 2011-2022 走看看