摘要: -- Create sequencecreate sequence INNERIDminvalue 1maxvalue 99999999999999start with 1increment by 1cache 20order;2.--INNERID.currval 指当前序列--INNERID.nextval 指下一个序列create table admin ( id varchar2(20), name varchar2(10));insert into admin values (INNERID.nextval,'a');insert into admin values 阅读全文
posted @ 2013-05-30 18:03 尹剑平 阅读(171) 评论(0) 推荐(0) 编辑
摘要: 需要创建索引的情况:(1) 经常查询的列上。(2) 作为主键的列上。(3) 经常用于连接的列上,主要是指外键。(4) 经常根据范围查找的列上。(5) 经常需要排序的列上。(6) 经常使用在where子句的列上。不需要创建索引的情况:(1) 在查询中很少使用的列。(2) 只有很少数据值的列,如:性别。(3) 定义为text,image,bit的数据类型。(4) 修改性能远远大于检索性能时。索引命名规则:主键(primary key)索引:PK_表名_列名唯一键(unique key)索引:UK_表名_列名普通索引:IND_表名_列名注:索引的命名不能超过30个字符(在索引中的列名可以简写,一般情 阅读全文
posted @ 2013-05-30 17:59 尹剑平 阅读(659) 评论(0) 推荐(0) 编辑
摘要: ORA-04098错误的文档说明如下:ORA-04098: trigger 'string.string' is invalid and failed re-validationCause: A trigger was attempted to be retrieved for execution and was found to be invalid. This also means that compilation/authorization failed for the trigger.Action: Options are to resolve the compilat 阅读全文
posted @ 2013-05-30 17:56 尹剑平 阅读(6178) 评论(0) 推荐(1) 编辑