为了账号安全,请及时绑定邮箱和手机立即绑定

Oracle数据库开发必备利器之SQL基础

难度入门
时长 4小时14分
学习人数
综合评分9.67
338人评价 查看评价
9.8 内容实用
9.7 简洁易懂
9.5 逻辑清晰

最新回答 / 慕粉2315592607
可以去百度,应该还有删一些注册表
TRUNCATE TABLE TB_NAME;--截断表,将表中的所有数据删除,并将数据原先占用的存储空间释放
DELETE FROM TB_NAME;--删除表中的所有数据,不将数据占用的内存资源释放
Oracle插入多条数据与mysql的SQL有点不同
INSERT ALL
INTO user_info (字段1,字段2,字段n) VALUES (值1,值2,值n)
INTO user_info (字段1,字段2,字段n) VALUES (值1,值2,值n)
INTO user_info (字段1,字段2,字段n) VALUES (值1,值2,值n)
INTO user_info (字段1,字段2,字段n) VALUES (值1,值2,值n)
SELECT 1 FROM DUAL ;

最新回答 / 变成小学生
没有制定主类,建议重装吧
Oracle中unique可以为null,而且允许多行为空。
通配符(_,%)
like 关键字

最新回答 / 学习从零开始
删除主键约束用到了DROP,是DDL(数据定义语言),需要添加ALTER TABLE 
select username,decode(username,'aaa','计算机部门','bbb','市场部门','其他') as 部门 from users;
select username,case when salary<800 then '工资低' when salary>5000 then '工资高' end as 工资水平 from users;
select username,case username when 'aaa' then '计算机部门' when'bbb' then '市场部门' else '其他部门' end as 部门 from users;
select username,case when usename='aaa' then '计算机部门' when username='bbb' then '市场部门' else '其他部门' end as 部门 from users;
select * from users order by id desc;
select * from users order by id desc,salary asc;
insert into users values(4,'aaa',1000);
select * from users order by username desc,salary asc;
select * from users where salary beteen 800 and 2000;
select * from users where salary not beteen 800 and 2000;
select * from users where username in ('aaa','bbb');
select * from users where username not in ('aaa','bbb');
select * from users;
select * from users where username like 'a%';
select * from users where username like 'a_';
select * from users where username like '_a%';
select * from users where username like '%a%';
select * from users;
select id,username,salary+200 from users;
select * from users;

select username from users where salary>800;

select username from users where salary>800 and salary<>1800.5;
select username form users where salary>800 or salary<>1800.5;
课程须知
只要知道数据库是什么就可以来学习本课程呦!
老师告诉你能学到什么?
掌握Oracle的SQL语句基础,为后续的课程学习打好基础。

微信扫码,参与3人拼团

意见反馈 帮助中心 APP下载
官方微信
友情提示:

您好,此课程属于迁移课程,您已购买该课程,无需重复购买,感谢您对慕课网的支持!

本次提问将花费2个积分

你的积分不足,无法发表

为什么扣积分?

本次提问将花费2个积分

继续发表请点击 "确定"

为什么扣积分?

举报

0/150
提交
取消