This is my table farm:
+--------+
| animal |
+--------+
| cat |
| monkey |
| bird |
| dog |
| horse |
+--------+
I want to make an exact duplicate of a string animal. Therefore, my table should look like this:
+--------+---------+
| animal | animal2 |
+--------+---------+
| cat | cat |
| monkey | monkey |
| bird | bird |
| dog | dog |
| horse | horse |
+--------+---------+
I tried
INSERT INTO `farm` (`animal2`) SELECT `animal` FROM `animals`
But what happens:
+--------+---------+
| animal | animal2 |
+--------+---------+
| cat | |
| monkey | |
| bird | |
| dog | |
| horse | |
| | cat |
| | monkey |
| | bird |
| | dog |
| | horse |
+--------+---------+
Jarla source
share