cmd后输入select * from system.aa1(表aa1中已有数据)提示:未选定行再输入“ insert into system.aa1(aa,bb)values('400','400');”提示“已创建一行”但是查询的时候并没有插入的数据,这是为什么?难道是没有真正连接到数据库?

解决方案 »

  1.   

    insert之后要执行commit;来进行显示提交结果到数据库中吧!
      

  2.   


    果然是这样
    但是为什么我在PLSQL DEVELPOER中插入的数据,不用commit就能在PLSQL DEVELOPER中直接查询而在DOS下插入的数据,一定要commit后才能查询的到?
      

  3.   

    Setting environment for using Microsoft Visual Studio 2008 x86 tools.C:\Program Files\Microsoft Visual Studio 9.0\VC>sqlplus scott/wellhopeSQL*Plus: Release 10.1.0.2.0 - Production on 星期三 10月 13 10:34:34 2010Copyright (c) 1982, 2004, Oracle.  All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.1.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining optionsSQL> create table t_for_sess (id number);Table created.SQL> insert into t_for_sess values(1);1 row created.SQL> select * from t_for_sess;        ID
    ----------
             1SQL>不可能啊
      

  4.   


    奇怪,你这个不用commit?我insert into 后一定要commit才能在dos下查询的到
      

  5.   

    本session不commit也是可见的,但是如果是其他session就见不到了.你确认你两步的操作是在一个session里?
      

  6.   

    需要提交事物 ,详细 oracle  官方资料 呵呵