mirror of
https://github.com/emilybache/GildedRose-Refactoring-Kata.git
synced 2026-10-14 18:15:41 +00:00
wrap drop statements inside blocks to avoid exception when running first time
This commit is contained in:
1 parent
5af2bcd4ac
commit
316476a258
2 files changed
+40
-10
No files matched your search
+12
-1
@@ -1,5 +1,14 @@
|
||||
PROMPT Creating Table 'ITEM'
|
||||
DROP TABLE item;
|
||||
|
||||
BEGIN
|
||||
EXECUTE IMMEDIATE 'DROP TABLE item';
|
||||
EXCEPTION
|
||||
WHEN OTHERS THEN
|
||||
IF SQLCODE != -942 THEN
|
||||
RAISE;
|
||||
END IF;
|
||||
END;
|
||||
|
||||
CREATE TABLE item
|
||||
(
|
||||
name VARCHAR2(100) NOT NULL,
|
||||
@@ -7,3 +16,5 @@ CREATE TABLE item
|
||||
quality NUMBER(6) NOT NULL
|
||||
);
|
||||
/
|
||||
|
||||
SHOW ERRORS;
|
||||
Reference in new issue
Block a user