create insert delete select
创建用户必须在sys超级管理员下;
连接到超级管理员:conn sys as sysdba
sys zhuangyan
system zhuangyan
scott tiger
查出所有'CLERK'(办事员)的姓名及其部门名称,部门的人数.
找出所有办事员的姓名及部门编号
select e.ename,d.dname,ed.cou
from emp e,dept d,(select deptno,count(empno) cou from emp group by deptno) ed
where job='CLERK' and e.deptno=d.deptno and ed.deptno=e.deptno;
1、表的建立及删除
2、约束的建立及删除
3、序列、同义词
4、表的连接
5、视图的作用及创建
6、了解一下用户管理
对用户的建立及管理(DCL)
1、创建用户create user 用户名 identified 密码
注意:创建用户需要赋予session的权限
grant 权限1,权限2.。。to 用户
grant create session to 用户
grant connect,resource to test
修改密码
alter user test identified by 新密码
让密码失效
alter user test password expire
锁住一个用户
alter user 用户名 account lock
解锁
alter user 用户名 account unlock
授权
grant select,delete on scott.emp to scott
撤销
revote select,delete on scott.emp from system
oralce的安装和备份
使用2个命令:
1数据库备份: exp
2数据库导入:imp
在e盘上建立data文件夹,备份数据