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!

Using Execute immediate in PL/SQL block

MansiRavalSep 19 2017 — edited Sep 22 2017

Hello Experts,

I have on table with below cols.

CREATE TABLE "TABLELIST"

   ( "TABLENAME" VARCHAR2(50 BYTE),

"CHECKCODE" NUMBER

   );

and value as

Insert into TABLELIST (TABLENAME,CHECKCODE) values ('table',1);

Insert into TABLELIST (TABLENAME,CHECKCODE) values ('table2',1);

Insert into TABLELIST (TABLENAME,CHECKCODE) values ('table3',2);

Insert into TABLELIST (TABLENAME,CHECKCODE) values ('table4',2);

I need to write code that compare table count for tables with same check code. Let say i need to check for the count for table and table 2,if they are same or not.

I tried creating cursor for "tablelist" but I am not able store the count in any variable.

Please suggest some way for this.

This post has been answered by Cookiemonster76 on Sep 19 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Oct 20 2017
Added on Sep 19 2017
35 comments
1,676 views