update in mysql select statement
Is there any way to run UPDATE or INSERT inside a SELECT statem开发者_JAVA百科ent in mysql?
Something like this?
INSERT california_authors (au_id, au_lname, au_fname)
SELECT au_id, au_lname, au_fname
FROM authors
WHERE State = 'CA'
More on that matter: http://www.sqlteam.com/article/using-select-to-insert-records
精彩评论