Check out example codes for "how to create a table structure from another table in mysql". It will help you in understanding the concepts better.

Code Example 1

CREATE TABLE new_tbl LIKE orig_tbl;  //(creates an empty table only definition is

Code Example 2

Press CTRL+C to copy CREATE TABLE new_tbl [AS] SELECT * FROM orig_tbl;

Code Example 3

CREATE TABLE artists_and_works
  SELECT, COUNT(work.artist_id) AS number_of_works
  FROM artist LEFT JOIN work ON = work.artist_id

Learn ReactJs, React Native from