2011-04-19 104 views
3

我給出了一個Excel文檔,其中包含有關不同大使館,他們的聯繫電話等信息。大多數信息已在數據庫中,但我需要從該文件中提取一列(電子郵件)並將其插入數據庫中的特定列(電子郵件)。將特定列導入到phpmyadmin數據庫中

這是可能的,還是隻能導入數據庫中想要的內容的精確副本?

感謝所有幫助

+0

我認爲你需要使用加載數據和導入電子郵件到一個空表。完成之後,您可以使用更新查詢與該表進行連接,以更新原始表。 – 2011-04-19 13:03:24

+0

這是可能的,爲更多的幫助。 Plz給你更多的信息.​​.. – Karthik 2011-04-19 13:06:08

回答

3
Export the table from phpmyadmin as CSV for excel - 
drag it into excel - 
add the desired column - 
Save - 
export the table again from phpmyadmin as .sql - 
copy the table creation(Not the data) - 
delete the table from phpmyadmin- 
Run the table creation query so you now have a blank table - 
Import the excel csv. 

重要提示:備份數據庫

2

你可能想使一個腳本php-excel-reader肚裏throught每一行的文件中,並更新相應的數據庫行。我不認爲你可以在phpMyAdmin中「選擇性地」導入一個文件。

相關問題