insert into
keyword_history (
keyword_id,
searchengine,
location,
"4",
curdate()
)
select
keyword_id,
searchengine,
location
from
keyword_history
where
history_id = 21
Basically, what I'm trying to do is :
Yes you can. You may want to try the following instead:
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;
EDIT: Updated field names as per comment below.
Try this; it seems you're putting values in your field list inadvertently...
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With