So far we've explained how to add data to a table and how to change it. The rest is to discuss how to delete data that is no longer needed. As with previous additions, deleting data must be deleted from the entire row in the table. In the previous section, we mentioned that SQL does not provide a way to specify a row directly. Therefore, deleting a row can only be done by declaring that the deleted row must match the condition. If you have a primary key on the table, you can declare the exact row. Of course, you can also delete a set of rows that match the criteria, or delete all the rows in the table at once.
We use the Delete command to delete a row. Its syntax is very similar to the UPDATE command. Use:
DELETE from Sites WHERE name = ' Www.infocool.net ';
If you just write:
DELETE from Sites;
Then all the rows in the table will be deleted! Programmers must be careful.
PostgreSQL Delete Data