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)

  • 相关阅读:
    乱七八糟的
    C# 获取客户端电脑MAC 地址
    CheckInput
    gridview 合计行实现
    乱七八糟22
    jQuery UI CSS Framework
    CSS float和CSS clear
    smtp,POP3,IMAP
    960GridSystem
    CSS 清除浮动
  • 原文地址:https://www.cnblogs.com/dwj192/p/7068252.html
Copyright © 2011-2022 走看看