我通过其他工具导入到ORACLE中一张表 表名为1.3.11.12
表结构如下:
-- Create table
create table 1.3.11.12
(
  CreateTime  DATE not null,
  RecordState VARCHAR2(10),
  percentUsed FLOAT,
  Mbfree      FLOAT,
  pagesPerSec FLOAT,
  TotalMemory FLOAT
)
tablespace OADATA
  pctfree 10
  initrans 1
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
-- Create/Recreate primary, unique and foreign key constraints 
alter table 1.3.11.12
  add primary key (CREATETIME)
  using index 
  tablespace OADATA
  pctfree 10
  initrans 2
  maxtrans 255
  storage
  (
    initial 64K
    minextents 1
    maxextents unlimited
  );
问题是:我用sql语句查询表中任何一个字段都会报错
例如:select createtime from "1.3.11.12" 执行之后报错(invalid identifier)谁能帮忙解决下 谢谢 

解决方案 »

  1.   

    刚帮你试了下,1.3.11.12样式的表名在oracle里面是无效的
      

  2.   

    select createtime from "1.3.11.12"
    不加引号试试
      

  3.   

    因为是导入的表 表名显示就是1.3.11.12
    如果就执行“select * from 1.3.11.12”会报错(invalid table name )我加了引号后(select * from “1.3.11.12”)就可以执行了
    但是select createtime from "1.3.11.12"就不行
      

  4.   

    没有问题啊!! 
    SQL> SELECT * FROM SYS."1.3.11.12";
     
    CREATETIME  RECORDSTATE                                                                      PERCENTUSED                                                                           MBFREE                                                                      PAGESPERSEC                                                                      TOTALMEMORY
    ----------- ----------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- -------------------------------------------------------------------------------- --------------------------------------------------------------------------------
     
    Executed in 0.032 seconds
     
    SQL> SELECT createtime FROM SYS."1.3.11.12";
     
    CREATETIME
    -----------
     
    Executed in 0.031 seconds
     
    SQL> 
      

  5.   


    是CreateTime的大小写问题吧  
      

  6.   

    1.3.11.12的表名是无效,但是建表的时候写成“1.3.11.12”是可以的,invalid identifier显示的是无效的表示符不是显示无效的表名。你看看查询的字段是不是写错了,可以改成select t.createtime from "1.3.11.12" t ,即是在t.后选择你要查询的字段试试
      

  7.   

    6楼说的正确
    select * from “1.3.11.12“