Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Question on Synonyms and Implicit Cursor

SuriApr 25 2013 — edited Apr 25 2013
Hi,

I've two doubts.

Question1:

Why Oracle is allowing me to create a synonym even base object does not exist in database.

For example in below example user ABC and object def doesnt exist in my database. Why I didnt get any error while creating a synonym.
Connected to Oracle Database 11g Express Edition Release 11.2.0.2.0 
Connected as hr


SQL> CREATE SYNONYM test_syn FOR ABC.def;

Synonym created

SQL> 
Question2:

In PL/SQL after closing the cursor if we use any cursor attribute it will throw exception like invalid cursor. Why it is not happening in case of implicit cursor.

Or

Does Oracle close implicit cursor(SQL) ?
declare

begin

  UPDATE emp
  SET ename = 'SURI';

 COMMIT;

 dbms_output.put_line(SQL%rowcount);

end;
Many thanks for all your help.

Cheers,
Suri
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 23 2013
Added on Apr 25 2013
6 comments
534 views