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?

Était-ce utile?

La solution

INSERT INTO users_links (`username`, `facebook`)
SELECT `username`, `facebook`
FROM users2
Licencié sous: CC-BY-SA avec attribution
Non affilié à StackOverflow
scroll top