Is it possible to import the attributes of one table, then I put it into another table using a query in mysql?
For example I have table1 with attributes lname, fname, mname
And I want to put those attributes into table2.
Is there any query that could do that? I’m imagining that the table2 has one attribute that could later be dropped so that it will be the same as table1.
I am not entirely sure what you are asking.
If you want to copy the structure of table1 into a new table, do something like this:
If you want to copy existing values from one table to another, you can then use the INSERT…SELECT syntax as follows: