Created
August 27, 2020 12:21
-
-
Save twobiers/9c97ddbdc8ca9163333760f707353200 to your computer and use it in GitHub Desktop.
SQL Oracle DML
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ------------------------------------ | |
-- DELETE | |
-- ------------------------------------ | |
DELETE FROM dml_test_table WHERE id = 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ------------------------------------ | |
-- INSERT | |
-- ------------------------------------ | |
INSERT INTO dml_test_table (id, col1) VALUES (1, 'hello'); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ------------------------------------ | |
-- Integritätsprüfung | |
-- DEFERRED -> Ende Transaktion | |
-- IMMEDIATE -> Ende DML | |
-- ------------------------------------ | |
CREATE TABLE transaction_test( | |
col1 VARCHAR2(20) NOT NULL INITIALLY DEFERRED, | |
col2 VARCHAR2(20) UNIQUE INITIALLY IMMEDIATE | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ------------------------------------ | |
-- TRANSAKTIONEN | |
-- ------------------------------------ | |
COMMIT; | |
ROLLBACK; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- ------------------------------------ | |
-- UPDATE | |
-- ------------------------------------ | |
UPDATE dml_test_table SET col1 = 'test' WHERE id = 1; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment