![](https://img-blog.csdnimg.cn/20201014180756916.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
Oracle
文章平均质量分 64
Oracle数据库
O-0-O
这个作者很懒,什么都没留下…
展开
-
ORA-02266 / 有外键依赖时truncate table
实际案例:https://mp.weixin.qq.com/s/Kz_SynNDfadUKB2UR7I54w从公众号转载的。能学到东西的公众号。有几个知识点没有弄明白:1. 查看10046事件(文章中有使用10046及说明)2. 延迟段概念3. user_constraint视图,查看表结构下面记录学到的一些东西一、ORA-02246报错表中的唯一/主键被...原创 2019-07-14 17:29:01 · 569 阅读 · 0 评论 -
SQL命令整理1
--查看版本号select * from v$parameter_valid_values where name='optimizer_features_enable' ;--查看执行计划的SQL--从最靠右边的开始看,如果有同列的,则先看上面再看下面,再看左边的。explain plan for SQL;select * from table(dbms_xplan.displa...原创 2019-07-07 19:42:20 · 124 阅读 · 0 评论 -
Oracle查看表的结构
一、user_constraints收集到的几个SQL:SELECTconstraint_nameFROMuser_constraintsWHEREtable_name='<table_you_are_trying_to_drop>'ANDconstraint_type='P'; SELECT*FROMuser_constraintsWHER...原创 2019-07-14 17:43:16 · 210 阅读 · 0 评论 -
表空间
表空间是Oracle数据库中最大的逻辑存储结构,它与操作系统中的数据文件相对应,用于存储数据库中用户创建的所有内容。在Oracle中,除了基本表空间以外,还有临时表空间、大文件表空间、非标准数据块表空间和撤销表空间。基本表空间一般指用户使用的永久性表空间,用于存储用户的永久性数据;临时表空间用于存储排序或汇总过程中产生的临时数据;大文件表空间用于存储大型数据;非标准数据块表空间用于在一个数据库实例中原创 2017-05-08 10:05:03 · 523 阅读 · 0 评论 -
SQL语句优化
要点掌握SELECT子句的优化掌握WHERE子句的优化了解COMMIT语句的作用熟练掌握使用表连接代替多个查询了解EXISTS操作符的使用理解”<=”代替”<”熟练掌握表的连接优化掌握索引的优化语句该大写就大写:因为最终还是大写的一般的SQL优化技巧SELECT语句中避免使用”*”当一条SQL语句从客户端进程传递到服务器端进程后,Oracle需要执行如下步骤: 1、 在共享池中原创 2017-05-08 10:04:41 · 404 阅读 · 0 评论 -
Oracle约束官方文档--外键约束
Foreign Key Constraints Whenever two tables contain one or more common columns, Oracle Database can enforce the relationship between the two tables through a foreign key constraint, also called...原创 2019-07-23 19:07:37 · 263 阅读 · 0 评论 -
Oracle数据库序列重置为1
背景介绍:我们的架构要求,数据库序列在日切时重置为1。这样每天该序列最后的值就是一天的交易量。方案介绍:create or replace procedure seq_res_1 --创建存储过程isv_sql varchar2(200);n number;begin select seq_name.CURRVAL into n from dual; v_sql:='alter sequence seq_name increment by ...原创 2020-09-02 17:02:43 · 3027 阅读 · 1 评论 -
Oracle大佬博客--链接
http://yangtingkun.net/http://travelskydba.com/https://blog.csdn.net/db_murphyhttps://quanwenzhao.wordpress.comhttp://www.eygle.com视频回放:https://www.modb.pro/course/40PPT:https://www....原创 2019-12-23 19:21:10 · 651 阅读 · 0 评论 -
Oracle约束官方文档--主键约束
Primary Key ConstraintsIn a primary key constraint, the values in the group of one or more columns subject tothe constraint uniquely identify the row.Each table can have one primary key, whichi...翻译 2019-07-21 17:43:28 · 255 阅读 · 0 评论 -
Oracle外键约束
一、创建外键约束两种方法1.创建表时create table 子表(id number,name varchar2(5),foreign key(id) references 父表(列名));2.随时更改alter table 子表 drop constraint 约束名;alter table 子表 add constraint 约束名 foreing...原创 2019-12-23 19:17:55 · 1732 阅读 · 0 评论 -
Oracle约束官方文档--总览、非空约束、唯一性约束
Types of Integrity ConstraintsOracle Database enables you to apply constraints both at the table and column level.A constraint specified as part of the definition of a column or attribute is an in...翻译 2019-07-15 20:07:52 · 279 阅读 · 0 评论