我用toad连接oracle后,使用select * from emp 
他提示说 ORA-00942: 表或视图不存在 select * from emp不知道为什么总是这个提示是不是类似mysql中的
需要先使用use database  命令 选中某一个数据库 然后才能使用sql语句呢谢谢大家解答

解决方案 »

  1.   

    以其他用户登录,select * from scott.emp 
    前提是你登录用户具有DBA权限或者有scott.emp的select权限。以scott 用户登录,select * from emp 
      

  2.   

    请输入用户名:  scott/123 as sysdba连接到:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining optionsSQL> select * from emp;
    select * from emp
                  *
    第 1 行出现错误:
    ORA-00942: 表或视图不存在
    谢谢楼上帮忙解答
    你看看我这个问题处在哪了? 谢谢 
      

  3.   

    请输入用户名:  scott/123 as sysdba 此时,你在sqlplus里
    SQL>show user
    结果是,USER是SYSSYSDBA登录,则为SYS用户不信?试一试!
    scott/123才是以scott登录!
      

  4.   

    应该是scott下面的emp真的不存在,或者以scott登录执行crate table emp()试试,看看是不是有冲突,若没有冲突,那就是emp真的不存在了。
      

  5.   

    谢谢suiziguo和楼上解答 我找到问题了, 因为oracle我是刚刚装的,装的时候我给scott重新该了密码为123
    后来就用 scott/123 as sysdba 连接
    这样使可以连接上的,但是连接完了就是没办法查询而且我直接用 conn scott/123 这样 登录他就提示我说 ORA-01017: invalid username/password; logon denied   我在装的时候把密码都该成123了
    刚刚找了下
    用:
    sqlplus/nolog 回车
    SQL>conn/as sysdba 回车
    SQL>alter user scott account unlock; 回车
    SQL>disconnect 回车
    SQL>conn scott/tiger@oral; 回车
    然后输入两次新定义的口令分别回车确认即可这个办法重新登录了一次 把scott密码又改了次,然后使用conn scott/123
    登录 再查询就出来结果了 谢谢