Skip to content

Commit 87922e2

Browse files
committed
update db
1 parent 559d180 commit 87922e2

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

db相关总结.md

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,6 @@
66
* ApexSQL: http://www.apexsql.com/
77
* Withdata: http://www.withdata.com/index.html
88

9-
Founded in 2002, Withdata Software is a technology company producing high-quality software for database administrators and developers.
10-
We do our best to design and develop products that remove complexity, and compress time frames. We are glad to realize that our products take usual chores upon themselves, so that our customers could have more time left for their creative work.
11-
129

1310
# MySQL
1411

@@ -351,7 +348,23 @@ ORA-28000: 账户锁定
351348
COMM NUMBER(7, 2),
352349
DEPTNO NUMBER(2));
353350
可以将上述存储过程加载到每一个create table前面。
354-
351+
352+
--ORACLE 判断序列是否存在,如果存在就删除
353+
354+
declare
355+
V_NUM number;
356+
357+
BEGIN
358+
----多次删除时,每次都将v_num设置成为0
359+
V_NUM := 0;
360+
----判断序列 seq_name_1 是否存在(区分大小写)
361+
select count(0) into V_NUM from user_sequences where sequence_name = 'SEQ_BUSINESS_PROCESS_INDEX_ID';
362+
----如果存在立即删除
363+
if V_NUM > 0 then
364+
execute immediate 'DROP SEQUENCE SEQ_BUSINESS_PROCESS_INDEX_ID';
365+
end if;
366+
END;
367+
355368

356369
-- 设置sqlplus模式显示总行数
357370
show pagesize; --查看当前的pagesize

0 commit comments

Comments
 (0)