PostgreSQL DML Operations

From NovaOrdis Knowledge Base
Revision as of 23:26, 22 May 2024 by Ovidiu (talk | contribs)
Jump to navigation Jump to search

Internal

INSERT

Standard SQL INSERT
INSERT INTO person ("id", "name") VALUES (10, 'Bob')

UPDATE

Standard SQL UPDATE
UPDATE person SET "id"=50 WHERE "name"='Bob'

DELETE

Standard SQL DELETE
DELETE FROM person WHERE "id"=10

SELECT

Standard SQL SELECT
SELECT "id", "name" FROM person