Delete data from an HStore table.
1 2 3 | DELETE FROM [ ONLY ] table_name [ * ] [ [ AS ] alias ] [ USING using_list ] [ WHERE condition ] |
If ONLY is specified, only that table is deleted. If ONLY is not specified, this table and all its sub-tables are deleted.
Specifies the name (optionally schema-qualified) of a target table.
Value range: an existing table name
Specifies the alias for the target table.
Value range: a string. It must comply with the naming convention.
Specifies the USING clause.
Specifies an expression that returns a value of type boolean. Only rows for which this expression returns true will be deleted.
1 2 3 4 5 6 7 | CREATE TABLE reason_t2 ( TABLE_SK INTEGER , TABLE_ID VARCHAR(20) , TABLE_NA VARCHAR(20) )WITH(ORIENTATION=COLUMN, ENABLE_HSTORE=ON); INSERT INTO reason_t2 VALUES (1, 'S01', 'StudentA'),(2, 'T01', 'TeacherA'),(3, 'T02', 'TeacherB'); |
1 2 | DELETE FROM reason_t2 WHERE TABLE_SK = 2; DELETE FROM reason_t2 AS rt2 WHERE rt2.TABLE_SK = 2; |
1 | DELETE FROM reason_t2 WHERE TABLE_SK in (1,3); |