I am trying to copy a few fields of video information from one MariaDB table to another using a subquery, decoupling some video info from a classified ads table for later refactoring.
video:
id (int 11 autoincrement)
video_source (varchar 50)
video_url (varchar 255)
user_id(int 11)
I copy two fields:
INSERT INTO videos (video_url,user_id)
VALUES (SELECT youtube_url as video_url, user_id
FROM ads WHERE ads.youtube_url!="")
The subquery works on its own, but the insert query gives me an error 1046 and the cryptic message that I have an error in my subquery.
What are issues with the auto increment field in the video table?
What is wrong with my query?