How to add another field to existing table in mysql

Ok i have this table table1

and I also have another table:

enter image description here

So, idAlbum is in the gallery table, what is this request? I want to select data from one field in one table and paste it into a field in another table.

+6
source share
2 answers

If you want to add a field to an existing table in PhpMyAdmin, go to the "Structure" tab while viewing its data, and at the bottom of the table structure you have the "Add [number]" field in the [start / end] field of the table. Click the button on the right and process using the forms.

+26
source
INSERT INTO tbl_temp2 (fld_id) SELECT tbl_temp1.fld_order_id FROM tbl_temp1 WHERE tbl_temp1.fld_order_id > 100; 
+1
source

Source: https://habr.com/ru/post/889918/


All Articles