mysql通过select查询出来的记录插入到数据表

mysql通过select查询出来的记录插入到数据表

INSERT INTO `sk_store_recipel`

(

`doctorId` ,`value` ,`name` ,`description` ,`createTime` ,`favUsername` ,`rtype` ,`fufa` ,`groupName` ,`recipelAmount`

,`ownMeterialNames`,`subGroupName`,`updateTime`


(

SELECT 1483 ,`value` ,`name` ,`description` ,CURRENT_TIMESTAMP ,'yanglifang02' ,`rtype` ,`fufa` ,`groupName` ,`recipelAmount` ,`ownMeterialNames`,`subGroupName`,CURRENT_TIMESTAMP
from `sk_store_recipel` 
WHERE (groupname = 'zzzzzz' or `groupName` = 'yyyyyy') and `favUsername` ='xxxxx'

)

猜你喜欢

转载自blog.csdn.net/SeaLong_/article/details/89671003