KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
Say I have a select SELECT DISTINCT id, customer_id, domain FROM config WHERE type = 'foo'; which returns some records. How can I do an insert for reach row in the result set like INSERT INTO config (id, customer_id, domain) VALUES (@id, @customer_id, 'www.example.com'); where @id and @customer_id are the fields of the row in the result set? edit: I didn't want to just duplicate it, but insert a new value in the field domain instead. Nevertheless a facepalm-situation as it's plain easy ;-) Thanks!
Tags (comma-separated)
Save Edits
Cancel