oracle-----sql--建表

file-user
create user by   identified by"123456";//创建用户
drop user tom//删除用户


Columns
id   char(4)
name  varchar2(100)
height  number(3)

birthday date/timestamp
photo  clob//字节型超大的  blob//字符节超大的



--创建表     --注释
create table student
(
    id char(4) not null,
    name varchar2(100) not null,
    height number(3),
    birthday  date
    sex  char(1)   null   --性别不能用boolean型
);
--删除表
drop table student;
sqlplus exam/password--链接   cmd
点击齿轮--创建成功
--crud
--查询语句
select*from student;--选中执行的语句点击此轮(到红毛看结果)
--修改
update student set height=height+5;
--删除
delete from student where id='0001';
--创建
insert into student values('0001','tom',200,to_date('1998-1-1','yyyy-MM-dd'));
insert into student(name,id) value('mary','0003');
--sql     ddl数据定义语言  dml数据操做语言 dcl数据控制语言
--管理员要做的事情
--表空间
creat tablespace exam_tbs
datefile 'D:'size 5 m reuse autoextend on maxsize,
    'D:'size 5 m reuse autoextend on
drop tablespace exam_tbs;   --drop删除表空间(文件不会删掉)
drop tablespace exam_tbs including contents  --删除表空间(包含内容)
--用户管理
create user exam identified by password default tablespace exam_;
drop user;--删除
drop user casecade--删除所有
--授权
grant create session to exam;
grant connect to exam;
grant resource to exam;
--收回权限
revoke create seeion from exam;
revoke resource from exam;
revoke connect from exam;

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值