有没有办法将列名作为日期的 csv 导入 o​​racle?

Is there any way to import csv that has column name as dates into oracle?

我尝试使用 oracle sql 开发人员工具,但它显示错误。并且无法将日期列作为 name.is 列导入,无法将此数据集导入 oracle。

[sql 开发工具中显示错误]

https://i.stack.imgur.com/y80Yb.png

日期(或类似的)不能用作 Oracle 中的列名:

SQL> create table test (27/3/2020 number);
create table test (27/3/2020 number)
                   *
ERROR at line 1:
ORA-00904: : invalid identifier

但是,如果您将它括在双引号中,那么它就可以工作了:

SQL> create table test ("27/3/2020" number);

Table created.

SQL>

但是,您可以这样做并不意味着您应该这样做。我建议不要。

有关 Schema Object Naming Rules 的更多信息。

此外,日期值应该是 table 中的列之一,而不是列本身。你想要的数据模型不好,不要那样做。