mysql - database multi-table joint query inserting into other libraries
为情所困
为情所困 2017-05-24 11:34:39
0
1
818

The table is almost the same as below
Library A
Table 1 content

id catid  areaid   title     content   linkman
12  32     4      标题一      内容一     张三

Table 2 area

areaid  areaname 
4       中国

Table 3 category

catid     catname
 32       分类项一

Library B
Table z list
id add catg title contents username

Z table and 1 table correspond one to one
How can we improve the table in library b?

为情所困
为情所困

reply all(1)
仅有的幸福
insert into B.list (id, areaname, catname, title, content, linkman) select content.id, area.areaname, category.catname, content.title, content.content, content.linkman from A.content content join A.area area on content.areaid = area.areaid join A.category category on category.catid = content.catid
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template