cmd窗口切换至sql:sqlplus/nolog
解锁scott用户:alter user scott account unlock
上锁scott用户:alter user scott account lock
创建用户:create user hotel identified by hotel;
给用户授权:grant resource,connect to hotel;
修改用户密码:alter user hotel identified by 123;
查询用户密码的hash值:select name,password from user$ ; (oracle 11g)
select username,password from dba_users;(oracle 11g之前的版本)
创建表:create table h_table(
hid number(3) not null primary key,
hname varchar2(5) not null
);
插入数据:insert into h_table values(1,'a');