79761519

Date: 2025-09-11 06:04:34
Score: 0.5
Natty:
Report link

GridDB Cloud does not support the DELETE ... USING syntax that is available in PostgreSQL and some other databases.

For single-table deletes, you need to use a simpler DELETE with a WHERE condition. For example, instead of:

DELETE FROM SensorInventory a
USING SensorInventory b
WHERE a.sensor_id = b.sensor_id
AND b.status = 'INACTIVE';

You can run a subquery in the WHERE clause, such as:

DELETE FROM SensorInventory
WHERE sensor_id IN (
    SELECT sensor_id
    FROM SensorInventory
    WHERE status = 'INACTIVE'
);

This will remove all rows where the sensor_id matches an entry marked as INACTIVE.

So the issue is not with the data, but with the SQL dialect — GridDB Cloud has its own supported SQL syntax, which does not include multi-table deletes.

Reasons:
  • Long answer (-0.5):
  • Has code block (-0.5):
  • Self-answer (0.5):
  • Low reputation (1):
Posted by: Muhammad Jahangir Mustafa