nerdexam
PostgreSQL_CE

PGCES-02 · Question #10

In the "customer" table, you want to change the "email" values which have an "id" value of 10000 or less, to NULL. Select the correct SQL statement to achieve this task.

The correct answer is C. UPDATE customer SET email = NULL WHERE id <= 10000. See the full explanation below for the reasoning.

Question

In the "customer" table, you want to change the "email" values which have an "id" value of 10000 or less, to NULL. Select the correct SQL statement to achieve this task.

Options

  • AUPDATE email = NULL FROM customer WHERE id <= 10000;
  • BUPDATE customer SET email IS NULL WHERE id < 10001;
  • CUPDATE customer SET email = NULL WHERE id <= 10000;
  • DDELETE FROMcustomer.email WHERE id < 10001;
  • EUPDATE FROM customer SET email = NULL WHERE id <= 10000;

How the community answered

(39 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    82% (32)
  • D
    8% (3)
  • E
    5% (2)

Community Discussion

No community discussion yet for this question.

Full PGCES-02 Practice