zoukankan      html  css  js  c++  java
  • oracle 笔记sqlplus

    create user xiaoming identified by 123;

    password xiaoming;

    drop user xiaoming;

    grant connect to xiaoming [with admin option];

    conn xiaoming/123

    grant resource to xiaoming;//可以建表了

    create table test(userid varchar2(30),username varchar2(30));

    grant select/update/all on emp to xiaoming [with grant option  可以把权限传递]

    revoke select on emp from xiaoming

    权限传递中上级被回收 ,下级也被 回收了

    select * from scotte.emp;

    role:

    connect/dba/resource

    用户管理

    创建profile文件 只能试3次,锁定2天
    create profile lock_account limit failed_login_attempts 3 password_lock_time 2;
    alter user scotte tee profile lock_account;

    alter user scott account unlock;
    终止口令 每10天要改密码,宽限2天
    create profile myprofile limit password_life_time 10
    password_grace_time 2;
    alter user scott profile myprofile;
    口令历史
    create profile password_history limit password_life_time 10 password_grace_time 2 password_reuse_time 10
    drop profile password_history

    表的管理

    基本查询

    alter session set nls_date_format='yyyy-mm-dd';
    create table student(
    xh char(4),
    xm varchar2(20),
    sex char(2),
    birthday date,
    sal number(7,2)
    );

    col ename heading “名字” format a40

    select sal*3+nvl(comm,0)*13  "anumal sal",ename from emp;

  • 相关阅读:
    SQLServer 2008 还原数据库备份版本不兼容的问题
    全排列函数
    n & 1
    最长公共子序列(LCS)最长递增子序列(LIS)
    unity3DGI
    多继承的缺点
    JSON文件导入Unity3d中是空的的问题
    丑数
    整数中1出现的次数
    检测鼠标是否在UI上unity
  • 原文地址:https://www.cnblogs.com/anjuncc/p/5827329.html
Copyright © 2011-2022 走看看