开发者

update in mysql select statement

开发者 https://www.devze.com 2022-12-11 22:27 出处:网络
Is there any way to run UPDATE or INSERT inside a SELECT statem开发者_JAVA百科ent in mysql?Something like this?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消