命令行:
regdit;注册表
servers.mcs;服务
sqlplus 我们与数据库之间的交互
指令:
conn 用户名/密码 切换用户
alter user 用户名 account lock 给相应用户上锁
alter user 用户名 account unlock 给相应用户解锁
grant dba to user用户名
revoke dba to user用户名
create user 用户名 identified by 密码
alter user用户名 identified by 密码
drop user用户名
SQL :结构化查询语言
用户管理表
DDL:数据定义语言。用来对表结构进行操作
create 创建
create table 表名
alter 修改
alter table 表名 rename to 新表名;
alter table 表名 rename column 旧字段名 to 新字段名;
alter table 表名 add 新字段 数据类型;
alter table 表名 drop 旧字段;
alter table 表名 modified 旧字段 新数据类型
drop 删除
drop table 表名 删除表结构,表数据
drop table 表名 purge 删除表结构,表数据
runcate 剪断
runcate table 表名 删除表空间,表数据
DML:数据操作语言。用来对表中的数据进行操作
insert 插入
insert into 表名 values(数据);
insert into 表名 values(数据) where 条件
delete 删除
delete from 表名 删除表中的所有数据
delete from 表名 where 条件
update 更新
例子:
update 表名 set sal = sal0.3
update 表名 set sal = sal0.3 where
DQL:数据查询语言
select 查询 select * from 表名
DCL:数据控制语言
grant授权
grant dba to user用户
revoke收回授权
revoke dba to user用户
TCL:事物控制语言
savepoint rollback回滚 commit提交