PostgreSQL DML Operations: Difference between revisions
Jump to navigation
Jump to search
(→UPDATE) |
(→DELETE) |
||
Line 15: | Line 15: | ||
=<TT>DELETE</TT>= | =<TT>DELETE</TT>= | ||
{{Internal|SQL_DELETE#Overview|Standard SQL <tt>DELETE</tt>}} | |||
<syntaxhighlight lang='sql'> | <syntaxhighlight lang='sql'> | ||
DELETE FROM TEST WHERE "ID"=10 | DELETE FROM TEST WHERE "ID"=10 | ||
</syntaxhighlight> | </syntaxhighlight> | ||
=<TT>SELECT</TT>= | =<TT>SELECT</TT>= | ||
<syntaxhighlight lang='sql'> | <syntaxhighlight lang='sql'> | ||
SELECT "ID", "NAME" FROM TEST | SELECT "ID", "NAME" FROM TEST | ||
</syntaxhighlight> | </syntaxhighlight> |
Revision as of 22:44, 22 May 2024
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
SELECT "ID", "NAME" FROM TEST