i have two tables

Articles
id bigint 20 unsigned pk autoinc
date_modified datetime
name varchar
title varchar
content text
 
Tags
id bigint 20 unsigned pk autoinc
name varchar

and i want to create this third table from above two tables

Articles_Tags
article_id bigint 20 unsigned
tag_id bigint 20 unsigned

how this table can be created using mysql query ??

I think that something like the following should do the job:-

SELECT Articles.id as article_id, Tags.id as tag_id INTO Articles_Tags FROM Articles INNER JOIN Tags ON Articles.Name = Tags.Name
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.