上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 76 下一页
摘要: ObjectivesAfter completing this lesson,you should be able to do the following:Identify the uses and types of control structuresConstruct an IF statementUse CASE statements and CASE expressionsConstruct and identify loop statementsUse guidelines when using conditional control structuresPL/SQL中,要区分sta 阅读全文
posted @ 2013-04-23 12:40 ArcerZhang 阅读(177) 评论(0) 推荐(0) 编辑
摘要: 1、在一个pl/sql block中,可以有多个transaction,一个transaction可以跨越多个PL/SQL block;PL/SQL块执行完成,但是事务没有提交SQL> begin 2 insert into tt values(1); 3 end; 4 /PL/SQL procedure successfully completed.SQL> select * from tt; ID---------- 0 1验证事务没有提交方法SQL> select addr from v$transaction;ADDR-----... 阅读全文
posted @ 2013-04-23 11:20 ArcerZhang 阅读(203) 评论(0) 推荐(0) 编辑
摘要: 当磁盘大小超过标准时会有报警提示,这时如果掌握df和du命令是非常明智的选择。 df可以查看一级文件夹大小、使用比例、档案系统及其挂入点,但对文件却无能为力。 du可以查看文件及文件夹的大小。 两者配合使用,非常有效。比如用df查看哪个一级目录过大,然后用df查看文件夹或文件的大小,如此便可迅速确定症结。 下面分别简要介绍df命令可以显示目前所有文件系统的可用空间及使用情形,请看下列这个例子:View Code [oracle@arcerzhang DATACENTER]$ df -hFilesystem Size Used Avail Use% Mounted on/... 阅读全文
posted @ 2013-04-23 09:59 ArcerZhang 阅读(671) 评论(0) 推荐(0) 编辑
摘要: ObjectivesAfter completing this lesson,you should be table to do the following:Determine the SQL statements that can be directly included in a PL/SQL executeable block.Manipulate data with DML statements in PL/SQLUse transaction control statements in PL/SQLMake use of the INTO clause to hold the val 阅读全文
posted @ 2013-04-22 23:25 ArcerZhang 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Nested Tables[表中有表]关联数组,是用在PL/SQL中的一种普通数据类型,无法存储在数据库中;嵌套表既可以在PL/SQL中使用,也可以存储在数据库中.VARRAY可变数组,既可以在PL/SQL中使用,也可以存储在数据库中.Summary of Collection TypesQuizIdentify situations in which you can use the %ROWTYPE attribute.When you are not sure about the structure of the underlying database table.When you wan 阅读全文
posted @ 2013-04-22 18:55 ArcerZhang 阅读(124) 评论(0) 推荐(0) 编辑
摘要: DECLARE SUBTYPE location_t IS VARCHAR2(64); TYPE population_type IS TABLE OF NUMBER INDEX BY location_t; l_country_population population_type; l_count PLS_INTEGER; l_location location_t;BEGIN l_country_population('Greenland') := 100000; l_country_popu... 阅读全文
posted @ 2013-04-22 15:50 ArcerZhang 阅读(165) 评论(0) 推荐(0) 编辑
摘要: Associative Arrays(INDEX BY Tables)An associative array is a PL/SQL collection with two columns:Primary Key of integer or string data type(主键可以使整型值,可以使字符串值)Column of scalar or record data typeIOT表表示存储在数据库中的一种数据类型.INDEX BY Table只能用在PL/SQL中,不能存储在数据库中.Associative Array StructureThe Order of Associative 阅读全文
posted @ 2013-04-22 15:48 ArcerZhang 阅读(219) 评论(0) 推荐(0) 编辑
摘要: The PL/SQL Text Book《Oracle PL/SQL Programming》Anchored DeclarationsWhen you anchor a datatype,you tell PL/SQL to set the datatype of your variable based on the datatype of an already defined data structure-another PL/SQL variable,a predefined TYPE or SUBTYPE,a database table,or a specific column in 阅读全文
posted @ 2013-04-21 17:09 ArcerZhang 阅读(231) 评论(0) 推荐(0) 编辑
摘要: ObjectivesAfter completing this lesson,you should be able to do the following:Describe PL/SQL collections and recordsCreate user-defined PL/SQL recordsCreate a PL/SQL record with the %ROWTYPE attributeCreate associative arraysOracle数据库中,复合数据类型包含:集合(collections)、记录(records)Oracle数据库中,集合的类型:(关联数组、嵌套表、 阅读全文
posted @ 2013-04-21 17:08 ArcerZhang 阅读(274) 评论(0) 推荐(0) 编辑
摘要: 1、FOR循环下,不需要显示关闭游标DECLARE CURSOR c_emp_cursor ( deptno NUMBER ) IS SELECT employee_id,last_name FROM employees WHERE department_id = deptno; r c_emp_cursor%ROWTYPE;BEGIN FOR i IN c_emp_cursor(10) LOOP DBMS_... 阅读全文
posted @ 2013-04-21 13:58 ArcerZhang 阅读(383) 评论(0) 推荐(0) 编辑
上一页 1 ··· 57 58 59 60 61 62 63 64 65 ··· 76 下一页