nerdexam
Oracle

1Z0-007 · Question #37

What does the TRUNCATE statement do?

The correct answer is B. Removes all rows from a table. Command TRUNCATE is used to remove all row data from the table, while leaving the definition of the table intact, including the definition of constraints and any associated database objects as indexes, constraints, and triggers on the table. Incorrect Answers A: Command…

Manipulating Data (DML)

Question

What does the TRUNCATE statement do?

Options

  • ARemoves the table
  • BRemoves all rows from a table
  • CShortens the table to 10 rows
  • DRemoves all columns from a table
  • ERemoves foreign keys from a table

How the community answered

(38 responses)
  • A
    11% (4)
  • B
    82% (31)
  • C
    5% (2)
  • D
    3% (1)

Explanation

Command TRUNCATE is used to remove all row data from the table, while leaving the definition of the table intact, including the definition of constraints and any associated database objects as indexes, constraints, and triggers on the table. Incorrect Answers A: Command TRUNCATE does not remove the table. DROP TABLE command does that. C: There is no command in Oracle to shortens the table to 10 rows: but you can do this with D: This command does not remove all columns from a table. E: This command does not remove all foreign keys from a table.

Topics

#TRUNCATE#DDL#remove rows#table data

Community Discussion

No community discussion yet for this question.

Full 1Z0-007 Practice