I have two tables, one is called video_2, one is called vlan.
Table vlan has two columns, one is vlan_id, one is area, it’s like an index.
video_2 contains several columns, vlan_id and area are two of them, the vlan_id value in this table is captured in other way
Now I want to insert a column of data into “area” column in table video_2 if the vlan_id is listed in vlan table
Here’s my command, but it has syntax error, can anyone help?
"INSERT INTO video_2 (area), SELECT vlan.area FROM vlan WHERE vlan.vlan_id = video_2.vlan_id"
Try this:Try this:
Or: This: