How to store MySQL query results in another Table?

前端 未结 4 1698
[愿得一人]
[愿得一人] 2020-12-23 02:45

How to store results from following query into another table. Considering there is an appropriate table already created.

SELECT labels.label,shortabstracts.         


        
4条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-23 03:07

    You can use the INSERT INTO TABLE SELECT....syntax:

    INSERT INTO new_table_name
    SELECT labels.label,shortabstracts.ShortAbstract,images.LinkToImage,types.Type 
    FROM ner.images,ner.labels,ner.shortabstracts,ner.types 
    WHERE labels.Resource=images.Resource AND labels.Resource=shortabstracts.Resource 
    AND labels.Resource=types.Resource;
    

提交回复
热议问题