zoukankan      html  css  js  c++  java
  • oracle数据库基本操作

    // oracle 连接数据库
    #sqlplus
    #connect sys/huaxing as sysdba

    // 显示所有用户
    select * from dba_users

    // 显示所有表
    select * from user_tables where table_name = '用户名'

    // 创建用户
    create user username identified by password
    // 授权dba权限
    grant dba to username;

    grant unlimited tablespace to zhangsan;//授予zhangsan用户使用表空间的权限
    grant create table to zhangsan;//授予创建表的权限
    grante drop table to zhangsan;//授予删除表的权限
    grant insert table to zhangsan;//插入表的权限
    grant update table to zhangsan;//修改表的权限

    // 导入dmp文件
    imp 用户名/密码@网络服务名 file=xxx.dmp full=y;
    // 导出dmp文件
    exp 用户名/密码@网络服务名 file=xxx.dmp tables=(表名);

    // 字符串拼接,后面加3个0
    update t_bc_rkqh set SJQHDM=concat(SJQHDM,'000')

    // 字符串截取
    update T_SI_YH set QHDM=substr(QHDM,0,12)

  • 相关阅读:
    S3:代理模式 Proxy
    S2:外观模式 Facade
    S1:适配器 Adapter
    C5:单例模式 Singleton
    C4:原型模式 Prototype
    C3:建造者模式 Builder
    C2:抽象工厂 Abstract Factory
    C1:工厂模式 Factory
    设计模式分类
    数据访问对象模式
  • 原文地址:https://www.cnblogs.com/dwj192/p/7068252.html
Copyright © 2011-2022 走看看