Question

I am trying to transfer data from one row to another within phpmyadmin, but when I attempt i I get the following error message.

Operand should contain 1 column(s)

Code I attempt :

INSERT INTO users_links 
    (`username`,`facebook`)
    SELECT 
    (`username`,`facebook`)
    FROM users2

However when I try this it works but Its not what I want.

INSERT INTO users_links 
        `username`
        SELECT 
        `username`
        FROM users2

Any ideas?

Was it helpful?

Solution

INSERT INTO users_links (`username`, `facebook`)
SELECT `username`, `facebook`
FROM users2
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top