Please enable JavaScript.
Coggle requires JavaScript to display documents.
Manipulated Query Tree - Coggle Diagram
Manipulated Query Tree
INSERT
Special values
TO_DATE(date, dateFormat)
SYSDATE
TO_CHAR()
M1: INSERT INTO table (cols) VALUES (values)
number of cols and values must be same
cols & values must be corresponding with each other one by one
M2: INSERT INTO table VALUES (all values)
If value is empty, NULL
insert values into specific row from specific table
Subquery
Copy rows from another table
INSERT ...
SELECT ...
FROM ...
...
Update col values from any table(s)
UPDATE ... SET col = (subquery) WHERE col = (subquery)
Nested query that solves complicated query
Delete rows based on query
DELETE FROM ... WHERE col = (subquery)
UPDATE
update values of a col in specific row
UPDATE table SET col = value WHERE ...
multiple cols can be SET by using comma
If WHERE is omitted, all rows will be SET
To fix error, use rollback; or commit;
DELETE
DELETE FROM table WHERE ...
If WHERE is omitted, all rows will be DELETE
multiple cols can be DELETE by using AND / OR
delete values of a col in specific row