nerdexam
Microsoft

98-361 · Question #255

You have a table named ITEMS with the following fields: - ID (integer, primary key. auto generated) - Description (text) - Completed (Boolean) You need to insert the following data in the table…

The correct answer is D. INSERT INTO ITEMS (Description, Completed) VALUES ('Cheese', 0). The string values TRUE and FALSE can be converted to bit values: TRUE is converted to 1 and FALSE is converted to 0.

Understanding Databases

Question

You have a table named ITEMS with the following fields:

  • ID (integer, primary key. auto generated)
  • Description (text)
  • Completed (Boolean)

You need to insert the following data in the table:

"Cheese", False Which statement should you use?

Options

  • AINSERT INTO ITEMS (Description, Completed) VALUES ('Cheese', 1)
  • BINSERT INTO ITEMS (ID, Description, Completed) VALUES (NEWID(), 'Cheese', 0)
  • CINSERT INTO ITEMS (ID, Description, Completed) VALUES (1, 'Cheese", 0)
  • DINSERT INTO ITEMS (Description, Completed) VALUES ('Cheese', 0)

How the community answered

(36 responses)
  • A
    3% (1)
  • B
    3% (1)
  • C
    11% (4)
  • D
    83% (30)

Explanation

The string values TRUE and FALSE can be converted to bit values: TRUE is converted to 1 and FALSE is converted to 0.

Topics

#SQL INSERT#auto-increment#Boolean values#primary key

Community Discussion

No community discussion yet for this question.

Full 98-361 Practice