Quick Reference: Oracle DML and DDL Statements

Just a quick reference of DML and DDL Oracle Statements and some links to visit.

DML Statements

Main Site: Oracle DML Statements

Insert
INSERT INTO table_name (list_of_columns)
VALUES (list_of_values);

Update
UPDATE table_name
SET column_name = value [, column_name = value]…
[ WHERE condition ];

Delete
DELETE FROM table_name
[ WHERE condition ];

DDL Statements

Main Site:  DDL Oracle Statements

Create
CREATE TABLE table_name
(
column1 datatype [ NULL | NOT NULL ],
column2 datatype [ NULL | NOT NULL ],

column_n datatype [ NULL | NOT NULL ] );

Alter
ALTER TABLE table_name
ADD column_name column-definition;

Drop
DROP [schema_name].TABLE table_name
[ CASCADE CONSTRAINTS ] [ PURGE ];

Extra

Some sites which contains interesting information about the last topics: 1, 2, 3.

Deja una respuesta