nerdexam
PostgreSQL_CE

PGCES-02 · Question #124

You want to delete rows in the "product" table which include the value '2004' in the "name" field. Select the correct statement to achieve this task.

The correct answer is D. DELETE FROM product WHERE name LIKE '%2004%'. See the full explanation below for the reasoning.

Question

You want to delete rows in the "product" table which include the value '2004' in the "name" field. Select the correct statement to achieve this task.

Options

  • ADELETE product WHERE name ~ '2004';
  • BDELETE product WHEREcontain(name, '2004');
  • CDELETE FROM product WHERE name IN '2004';
  • DDELETE FROM product WHERE name LIKE '%2004%';
  • EDELETE FROM product WHERE name SIMILAR TO '2004';

How the community answered

(39 responses)
  • A
    8% (3)
  • B
    3% (1)
  • C
    3% (1)
  • D
    74% (29)
  • E
    13% (5)

Community Discussion

No community discussion yet for this question.

Full PGCES-02 Practice