Question discussion

While creating a new table ProductOrder_2026, which SQL statement correctly inserts all the records from the ProductOrder_2026 table into P…

358823Medium DSSSB TGT Computer Science 0 replies 0 views
0
While creating a new table ProductOrder_2026, which SQL statement correctly inserts all the records from the ProductOrder_2026 table into ProductOrder?
  • ACREATE TABLE ProductOrder_2026 AS CREATE * FROM ProductOrder;
  • BCREATE TABLE ProductOrder_2026 AS SELECT * FROM ProductOrder;
  • CCREATE TABLE ProductOrder_2026 AS UPDATE * FROM ProductOrder;
  • DCREATE TABLE ProductOrder_2026 AS INSERT * FROM ProductOrder ;
Correct answer: B

Explanation

CREATE TABLE new_table AS SELECT * FROM old_table; creates a new table and copies all the rows from the old table.

Discussion 0

Nobody has replied yet. Start the discussion!