PostgreSQL DML Operations

From NovaOrdis Knowledge Base
Jump to navigation Jump to search

Internal

INSERT

Standard SQL INSERT
INSERT INTO TEST ("ID", "NAME") VALUES (10, 'Bob')

UPDATE

Standard SQL UPDATE
UPDATE TEST SET "ID"=50 WHERE "NAME"='Bob'

DELETE

Standard SQL DELETE
DELETE FROM TEST WHERE "ID"=10

SELECT

Standard SQL SELECT
SELECT "ID", "NAME" FROM TEST