码迷,mamicode.com
首页 >  
搜索关键字:scott gu    ( 1154个结果
Oracle PLSQL Demo - 08.定义显式游标[Define CURSOR, Open, Fetch, Close CURSOR]
declare v_empno scott.emp.empno%type; v_sal scott.emp.sal%type; cursor cur_emp is select t.empno, t.sal from scott.emp t;begin op...
分类:数据库   时间:2015-06-29 23:47:12    阅读次数:153
Oracle PLSQL Demo - 14.定义定参数的显示游标
declare v_empno scott.emp.empno%type; v_sal scott.emp.sal%type; cursor cur_emp(v_empno number default 7369) is select t.empno, t.sal...
分类:数据库   时间:2015-06-29 23:46:37    阅读次数:198
Oracle PLSQL Demo - 15.强类型REF游标[预先指定查询类型与返回类型]
declare Type ref_cur_emp IS REF CURSOR RETURN scott.emp%RowType; cur_emp ref_cur_emp; rec_emp cur_emp%RowType; v_sql varchar2(100) := 'sel...
分类:数据库   时间:2015-06-29 23:43:51    阅读次数:183
Oracle PLSQL Demo - 09.Open、Fetch遍历游标[Open, Fetch, Close Record CURSOR]
declare r_emp scott.emp%rowtype; cursor cur_emp is select t.* from scott.emp t;begin open cur_emp; loop fetch cur_emp ...
分类:数据库   时间:2015-06-29 23:42:44    阅读次数:174
Oracle PLSQL Demo - 13.游标的各种属性[Found NotFound ISOpen RowCount CURSOR]
declare r_emp scott.emp%rowtype; cursor cur_emp is select t.* from scott.emp t;begin open cur_emp; if cur_emp%isopen then db...
分类:数据库   时间:2015-06-29 23:36:21    阅读次数:172
使用分析函数进行行列转换
其实使用分析函数进行处理是很好的方式,翻一下Tom的书,将其中的一个例子收录在这里. 比如查询scott.emp表的用户SAL排序信息,可以使用如下查询:SQL> SELECT deptno, ename, 2 ROW_NUMBER () OVER (PARTITION BY de...
分类:其他好文   时间:2015-06-29 19:35:12    阅读次数:104
oracle数据库使用之数据查询入门
1.在查询过程中使用算术表达式对数据进行运算 student表结构如下: 最后一项salary表示每个人的月薪,我现在想查询每个人的年薪: 2.使用nvl函数处理null值,向表中插入一条数据,该数据的salary项为null: 不使用nvl函数:使用nvl函数: 3.将查询结果的字符串连接起来:这里我们使用oracle安装好之后scott用户自带的emp表:4.查找1982年...
分类:数据库   时间:2015-06-29 14:57:57    阅读次数:165
Mysql事务隔离级别
scott@PROD>select * from dept1; DEPTNO DNAME LOC ---------- -------------- ------------- 10 ACCOUNTING NEW YORK 20 RESEARCH DALLAS 30 SALES CHICAG...
分类:数据库   时间:2015-06-29 10:06:59    阅读次数:169
Oracle 用户权限管理方法
Oracle 用户权限管理方法sys;//系统管理员,拥有最高权限system;//本地管理员,次高权限scott;//普通用户,密码默认为tiger,默认未解锁sys;//系统管理员,拥有最高权限system;//本地管理员,次高权限scott;//普通用户,密码默认为tiger,默认未解锁二、登...
分类:数据库   时间:2015-06-29 08:44:49    阅读次数:124
oracle授权另外一个用户访问自己创建的数据对象
oracle安装好之后,有一个默认的scott用户,该用户有一个默认的emp表,怎样让新创建的用户也能够访问这个表呢? 授权xiaoming这个用户访问emp表,但是xiaoming只有select权限,如果想给他delete权限,只需要把select换为delete即可,如果想给他所有权限,则把select换为all即可。 那么怎么撤销授权呢?...
分类:数据库   时间:2015-06-27 21:29:37    阅读次数:137
1154条   上一页 1 ... 84 85 86 87 88 ... 116 下一页
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!