Insert – Subquery returns more then 1 row

Insert – Subquery returns more then 1 row

Reference: https://www.tek-tips.com/viewthread.cfm?qid=1557007

 

INSERT
INTO mem_password
( `mem_name`
, `password`,
`hash_password`)
SELECT mem_name
, ‘No password’,’f8cf7801bd44f47bdf08e4ab122ab5bc’
FROM member_info AS a WHERE NOT EXISTS ( SELECT * FROM mem_password AS b WHERE a.mem_name=b.mem_name ) and a.version=’7.2.2′ and a.mem_role!=’admin’

top