PostgreSQL DML Operations: Difference between revisions

From NovaOrdis Knowledge Base
Jump to navigation Jump to search
No edit summary
Line 6: Line 6:
INSERT INTO TEST ("ID", "NAME") VALUES (10, 'Bob')
INSERT INTO TEST ("ID", "NAME") VALUES (10, 'Bob')
</syntaxhighlight>
</syntaxhighlight>
=<TT>UPDATE</TT>=
=<TT>UPDATE</TT>=
<syntaxhighlight lang='sql'>
<syntaxhighlight lang='sql'>
UPDATE TEST SET "ID"=50 WHERE "NAME"='Bob'
UPDATE TEST SET "ID"=50 WHERE "NAME"='Bob'
</syntaxhighlight>
</syntaxhighlight>
=<TT>DELETE</TT>=
=<TT>DELETE</TT>=
<syntaxhighlight lang='sql'>
DELETE FROM TEST WHERE "ID"=10
</syntaxhighlight>
=<TT>SELECT</TT>=
=<TT>SELECT</TT>=

Revision as of 04:01, 14 October 2023

Internal

INSERT

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

UPDATE

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

DELETE

DELETE FROM TEST WHERE "ID"=10

SELECT