玩转oracle 11g(15):命令学习3
11插入數(shù)據(jù)
INSERT INTO student VALUES ('A007', null,'女', '小華', '24-7月-15', 27,17891345129,32000,'工程部');
select * from student where xh is null;--查找某一項(xiàng)值為空
12 select coalesce(XH,0) from student--將空值轉(zhuǎn)換為實(shí)際值
13按指定方式排序
select name,depo,sal from student order by sal desc;--按工資大小進(jìn)行升序排列
14 select xh,depo,sal from student order by xh,sal desc;--按照優(yōu)先次序從左向右排列
15繼續(xù)插入數(shù)據(jù)
INSERT INTO student VALUES ('A008', 0805,'女', '小華', '21-7月-15', 37,17891345129,32000,'研發(fā)部');
INSERT INTO student VALUES ('A009', 0806,'女', '小華', '21-7月-15', 47,17891345129,11200,'研發(fā)部');
select name,birthday,telephone
?from student order by substr(telephone,length(telephone)-2)
?--查找姓名,生日,電話號(hào)碼按照電話號(hào)碼的最后兩個(gè)字段排序
總結(jié)
以上是生活随笔為你收集整理的玩转oracle 11g(15):命令学习3的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問(wèn)題。
- 上一篇: 系统清理软件测试,系统垃圾清理有用吗?六
- 下一篇: Visual Basic6.0下载及安装