Multiple choice technology mainframe

Given the DDL statement: CREATE TABLE newtab LIKE tab. Which of the following would occur as a result of the statement execution?

  1. NEWTAB would have the same column names, attributes and referntial integrity as TAB.

  2. NEWTAB would have the same column names and attributes as TAB.

  3. NEWTAB would have the same column names, attributes, indexes and constraints as TAB.

  4. NEWTAB would have the same column names, attributes and data as TAB.

Reveal answer Fill a bubble to check yourself
B Correct answer
Explanation

CREATE TABLE newtab LIKE tab copies the column definitions and their data types from tab but does not duplicate indexes, constraints, or any existing rows, so the new table has the same columns and attributes only.