Question 19Asked in DSSSB TGT Computer Science (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

While creating a new table ProductOrder_2026, which SQL statement correctly inserts

While creating a new table ProductOrder_2026, which SQL statement correctly inserts all the records from the ProductOrder_2026 table into ProductOrder?
  1. ACREATE TABLE ProductOrder_2026 AS CREATE * FROM ProductOrder;
  2. BCREATE TABLE ProductOrder_2026 AS SELECT * FROM ProductOrder;
  3. CCREATE TABLE ProductOrder_2026 AS UPDATE * FROM ProductOrder;
  4. DCREATE TABLE ProductOrder_2026 AS INSERT * FROM ProductOrder ;
Show answerHide answer

Correct answer: (B) CREATE TABLE ProductOrder_2026 AS SELECT * FROM ProductOrder;

Explanation

CREATE TABLE new_table AS SELECT * FROM old_table creates the new table and copies all rows of the old one into it. CREATE, UPDATE or INSERT cannot follow AS here.

From DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1:00 PM)

This is question 19 of DSSSB TGT Computer Science PYQ (Technical), 12 Sep 2025, Shift 2 (1:00 PM). See all questions of this paper with answers, or attempt the paper as a timed online test to get your score and all-India rank.