gpt4 book ai didi

mysql - 将 CSV 导入 phpmyadmin

转载 作者:IT老高 更新时间:2023-10-28 23:46:38 26 4
gpt4 key购买 nike

我有一个看起来像这样的 CSV,

candidate_id,show_on_site,first_name,surname,gender,DOB,showdob,Location,height,eyes,hair_colour,hair_length,accents,unions,training,url,visible,availability
,26,urban talent,Strawberry,Shortcake,Female,11 Jan 1942,FALSE,Manchester,5'2,Brown,Black,Mid-length,Native Lancashire,Equity,Urban Talent TV & Drama Workshops,Strawberry-Shortcake---5.4.06.jpg,Yes,Yes
,29,urban talent,Rainbow,Brite,Female,12 Oct 1970,FALSE,Manchester,5'7,Brown,Dark Brown,Long,"Native Manchester, others include - Cheshire, RP, Patois, Standard USA",Equity Member,"BA Acting Studies, Arden School of Theatre<br>Urban Talent TV & Drama Workshops",Rainbow Brite 1_1.jpg,Yes,Yes
,31,urban talent,Webbigail,Vanderquack,Female,4 Jun 1947,FALSE,Manchester,5'0,Hazel,Blonde,Mid-length,"Native Manchester, others include - Liverpool, Cockney, Birmingham, West Country, Standard Scottish, Standard Welch, S Irish",,Manchester School of Acting<br>3 Years at David Johnson Acting Workshops,Webbigail Vanderquack web 1.jpg,Yes,Yes
,33,urban talent,Smurfette,Smurf,Female,1 Jul 1979,FALSE,Manchester,5'2,Dark Brown,Dark Brown,Long,"Native Manchester, others include - Liverpool, RP, Lancashire, Birmingham, Cockney, Devon, Geordie, West Country, Glasgow, Edinburgh, South African, Standard & Southern US, Persian, Asian, Indian ~ good ear for accents",,"Manchester School of Acting, with Mark Hudson<br>North Cheshire Theatre College, with David Johnson<Oldham Theatre Workshop",Smurfette Smurf web 4.jpg,Yes,Yes

是否可以仅将此数据插入到我数据库中的现有列中,我似乎将其作为一个新表插入,然后该表具有列名 A、B、C、D、E 等。

最佳答案

在 phpMyAdmin 中,单击表格,然后单击页面顶部的“导入”选项卡。

浏览并打开 csv 文件。保持字符集不变。取消选中部分导入,除非你有一个巨大的数据集(或缓慢的服务器)。选择文件后,格式应该已经选择了“CSV”,如果没有选择它(不使用加载数据)。如果要在导入前清除整个表格,请勾选“用文件替换表格数据”。如果您认为 CSV 文件中有重复项,可选择选中“忽略重复行”。现在是重要的部分,将接下来的四个字段设置为这些值:

Fields terminated by: ,
Fields enclosed by: “
Fields escaped by: \
Lines terminated by: auto

目前这些匹配默认值,除了“Fields terminated by”,默认为分号。

现在点击 Go 按钮,它应该会成功运行。

关于mysql - 将 CSV 导入 phpmyadmin,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/9734486/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com