insert into
keyword_history (
keyword_id,
searchengine,
location,
"4",
curdate()
)
select
keyword_id,
searchengine,
location
from
keyword_history
where
history_id = 21
基本上,我要做的是:
答案 0 :(得分:12)
是的,你可以。您可能需要尝试以下方法:
INSERT INTO keyword_history
(
keyword_id,
searchengine,
location,
rec_date,
currentrank
)
SELECT keyword_id,
searchengine,
location,
curdate(),
'4'
FROM keyword_history
WHERE history_id = 21;
编辑:根据以下评论更新了字段名称。
答案 1 :(得分:1)
试试这个;看来你无意中将值放在你的字段列表中......
insert into keyword_history
(keyword_id, searchengine, location, your_number_col, your_date_col)
select keyword_id, searchengine, location, '4', curdate()
from keyword_history
where history_id = 21