Results 1 to 3 of 3

Thread: Sql

  1. #1
    Join Date
    May 2013
    Posts
    33

    Unanswered: Sql

    Hi this is my script and save it as text file.
    Code:
    drop table sample;
    
    create table sample(id number,salary number);
    
    insert into sample values(10,1000);
    
    insert into sample values(20,2000);
    
    begin
        insert into sample values(30,1000);
        insert into sample values(40,2000);
    end;
    
    
    commit;
    
    select * from sample;

    When i run this script in oracle 10g enterprise edition SQL*PLUS, it is not executing properly...

    Code:
    SQL> @F:\satheesh.sql
    
    Table dropped.
    
    
    Table created.
    
    
    1 row created.
    
    
    1 row created.
    
     10

    It stops with 10 which i have mentioned above.
    can any explain me why it is happening like this?


    But when i remove PLSQL statement from the above script , it is executing properly.

    WHY?
    Last edited by satheeshsharma; 07-24-13 at 07:28.

  2. #2
    Join Date
    Mar 2007
    Posts
    623
    Quote Originally Posted by satheeshsharma View Post
    It stops with 10 which i have mentioned above.
    can any explain me why it is happening like this?


    But when i remove PLSQL statement from the above script , it is executing properly.

    WHY?
    Because you did not terminate nor execute your anonymous PL/SQL block so SQL*Plus is waiting for its termination.

    You may find more explanation about SQL*Plus behaviour in SQL*Plus User's Guide and Reference, which is available with other Oracle documentation books e.g. online on http://tahiti.oracle.com/

    For 11gR2, the article about running PL/SQL blocks is placed here: http://docs.oracle.com/cd/E11882_01/...r.htm#i1039663

  3. #3
    Join Date
    May 2013
    Posts
    33
    Really forget to correct the known error...Thanks for ur reply Mr.flyboy...

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •