I have a MySQL database table named items
with 10,000+ records. Of these records, I would like to export only records where item_isbn IS NULL
.
SELECT * FROM Items WHERE item_isbn IS NULL
produces a table with 500 records, a sample of the data is below;
+---------+------------+-----------+
| item_id | item_title | item_isbn |
+---------+------------+-----------+
| 1 | Jo | NULL |
+---------+------------+-----------+
| 24 | Cars | NULL |
+---------+------------+-----------+
| 315 | Fun | NULL |
+---------+------------+-----------+
| etc | etc | etc |
+---------+------------+-----------+
I have exported this table as a CSV file, and have populated it with the necessary ISBNs via MS Excel. I'm now ready to re-import the data into the itens
table.
How can I re-import these 500 records into the items
table, whilst overwriting only the same 500 records, and maintaining the same item_id
.
Is there a more efficient way of doing this?
I am using PhpMyAdmin.
Any help appreciated.