MySQL: Copy a field to another table

Posted by harpax on Stack Overflow See other posts from Stack Overflow or by harpax
Published on 2010-03-23T12:43:50Z Indexed on 2010/03/23 13:13 UTC
Read the original article Hit count: 332

Filed under:
|
|

I have a table posts that could look like this:

  id  |  title  |  body  |  created  | ..
-------------------------------------------

I would like to use the boolean search feature that is offered by a MyISAM Table, but the posts table is InnoDB. So I created another table 'post_contents' that looks like this:

  post_id  |  body
--------------------

That table is already filled with some contents and I can use the boolean search. However, I need to move the title field in the post_contents table as well and then copy the existing title-data to the new field.

I know about the INSERT .. SELECT syntax, but I don't seem to be able to create the correct query.

© Stack Overflow or respective owner

Related posts about mysql

Related posts about query