如何导入excel文件到postgreSQL
1个回答
展开全部
方法一:工具
1,把EXCEL文件另存为CSV文件,(直接用EXCEL文件,好像数据不太容易导入,具体原因不明)
2,打开EMS PostgreSQL Manager 工具,选中import data选中导入文件类型选中CSV
3:注意,导入的数据库的编码格式为:SQL_ASCII
方法儿:用命令
COPY tablename [ ( column [, ...] ) ]
FROM { 'filename' | STDIN }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] 'delimiter' ]
[ NULL [ AS ] 'null string' ]
[ CSV [ QUOTE [ AS ] 'quote' ]
[ ESCAPE [ AS ] 'escape' ]
[ FORCE NOT NULL column [, ...] ]
1,把EXCEL文件另存为CSV文件,(直接用EXCEL文件,好像数据不太容易导入,具体原因不明)
2,打开EMS PostgreSQL Manager 工具,选中import data选中导入文件类型选中CSV
3:注意,导入的数据库的编码格式为:SQL_ASCII
方法儿:用命令
COPY tablename [ ( column [, ...] ) ]
FROM { 'filename' | STDIN }
[ [ WITH ]
[ BINARY ]
[ OIDS ]
[ DELIMITER [ AS ] 'delimiter' ]
[ NULL [ AS ] 'null string' ]
[ CSV [ QUOTE [ AS ] 'quote' ]
[ ESCAPE [ AS ] 'escape' ]
[ FORCE NOT NULL column [, ...] ]
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询