我的数据库里面有一个表,表名中 有  “-”
但是
select * from project-teamer   报错,“00933,sql命令未正确结束”。 drop 该表也是这个错误,用DBA登入也无法删除。请问是什么问题。

解决方案 »

  1.   

    试试这个select * from "project-teamer";
    drop table "project-teamer";
      

  2.   

    你这样也能创建表成功?你先
    select table_name from user_tables
    找到那个表名
    然后复制那个表名 drop table "表名" --大小写要完全一样scott@YPCOST> create table "test-test"(id number);Table created.scott@YPCOST> drop table test-test;
    drop table test-test
                   *
    ERROR at line 1:
    ORA-00933: SQL command not properly ended
    scott@YPCOST> drop table "Test-test";
    drop table "Test-test"
               *
    ERROR at line 1:
    ORA-00942: table or view does not exist
    scott@YPCOST> drop table "test-test";Table dropped.
      

  3.   


    SQL> create table "lq-lq"(stuid number);
     
    Table created
     
    SQL> insert into "lq-lq" values(10);
     
    1 row inserted
     
    SQL> commit;
     
    Commit complete
     
    SQL> select * from "lq-lq";
     
         STUID
    ----------
            10
     
    SQL> drop table "lq-lq";
     
    Table dropped
     
    SQL> 
    。囧了莫非因为我是11g的缘故?