我想通过以下命令将所有数据从txt
复制到PostgreSql
:
COPY employees FROM 'C:/Users/Public/staff.txt' WITH (FORMAT csv);
但是出现标题错误。
这是我来自staff.txt
的示例:
1,0XSUJ0F,Jax,Teller,John,15.01.1944,02.12.1968,02.12.1988,Vice-president,3500
我的employee
表中有number,fin,name,surname,patronimic,birthdate,contractstart,contractend,position
和salary
列。