欢迎来到天天文库
浏览记录
ID:42998422
大小:1.90 MB
页数:69页
时间:2019-09-27
《Toad使用教程》由会员上传分享,免费在线阅读,更多相关内容在学术论文-天天文库。
1、ToadforOracle1涉及到的内容连接查询(单表、多表、嵌套、函数)追加(单行、多行、表间)删除(记录、整表)更新(直接、嵌套)2ToadforOracle11.5连接知识点:系统级的监控必须用sys用户或system用户登录。用sys用户登录时,Connectas选择SYSDBA;用system用户登录,Connectas选择Normal,否则会报错。sys是系统内置的一个管理用户,这个用户只能用来做管理。system本质上讲是一个一般用户,被赋予了管理员权限。3Database-Create-User创建用户4Data
2、base-Create-Table创建表5Database-SchemaBrowser添加数据6Database-Monitor-DatabaseBrowser删除用户7用SQL进行单表查询查询所有的记录查询所有记录的某些字段查询某些字段不同记录单条件的查询组合条件的查询排序查询分组查询字段运算查询变换查询显示8在【命令编辑区】执行输入“select*fromscott.emp”,然后单击【执行】按钮,出现图所示的emp数据表所有记录。查询所有的记录9在【命令编辑区】输入“selectempno,ename,jobfromscott.
3、emp”,然后单击【执行】按钮,将显示emp数据表的empno、ename和job字段查询所有记录的某些字段10在上图所示的job字段中,可以发现有相同的数据,为了查询有多少种不同的job,在【命令编辑区】输入“selectdistinctjobfromscott.emp”,然后单击【执行】按钮,出现下图结果。查询某些字段不同记录多个字段能否distinct?11输入“selectempno,ename,jobfromscott.empwherejob='MANAGER'”,然后单击【执行】按钮,出现字符型字段条件查询的结果,查询的是
4、job为MANAGER的记录。单条件的查询12输入“selectempno,ename,salfromscott.empwheresal<=2500”,然后单击【执行】按钮,出现数字型字段条件查询的结果,查询的是满足sal小于等于2500的记录。单条件的查询13单条件的查询=(等于)select*fromscott.empwherejob='MANAGER';select*fromscott.empwheresal=1100;!=(不等于)select*fromscott.empwherejob!='MANAGER';select*f
5、romscott.empwheresal!=1100;^=(不等于)select*fromscott.empwherejob^='MANAGER';select*fromscott.empwheresal^=1100;<>(不等于)select*fromscott.empwherejob<>'MANAGER';select*fromscott.empwheresal<>1100;<(小于)select*fromscott.empwheresal<2000;select*fromscott.empwherejob<'MANAGER';>
6、(大于)select*fromscott.empwheresal>2000;select*fromscott.empwherejob>'MANAGER';比较运算符14单条件的查询<=select*fromscott.empwheresal<=2000;select*fromscott.empwherejob<='MANAGER';>=select*fromscott.empwheresal>=2000;select*fromscott.empwherejob>='MANAGER';in(列表)select*fromscott.emp
7、wheresalin(2000,1000,3000);select*fromscott.empwherejobin('MANAGER','CLERK');notinselect*fromscott.empwheresalnotin(2000,1000,3000);select*fromscott.empwherejobnotin('MANAGER','CLERK');betweenselect*fromscott.empwheresalbetween2000and3000;select*fromscott.empwherejobbet
8、ween'CLERK'and'MANAGER';notbetweenselect*fromscott.empwheresalnotbetween2000and3000;select*fromscott.empwherej
此文档下载收益归作者所有