Tuesday, April 15, 2025

Breaking News
>> Securing and encrypt View State and Cookies values  >> Page has one or more controls that do not correspond with   >> “The Controls collection cannot be modified because the control contains code blocks”  >> How to fix "Validation(): Element 'xxxx' is not supported  >> How to create a new session in ASP.NET programmatically  >> MySQL Database Backup using mysqldump command    

Editors Picks

Tuesday, December 6, 2011

create table from another table in stored procedure in oracle


create table from another table in stored procedure in oracle

CREATE OR REPLACE PROCEDURE PRC_CREATETABLE is
circlecode varchar2(20);
cursor  c1 is select distinct circle_code from circle_master;
BEGIN
 open c1;
  loop     
      fetch c1 into circlecode;
        EXIT WHEN c1%NOTFOUND;
       EXECUTE IMMEDIATE 'CREATE TABLE  tablename AS (SELECT *  refencetablename WHERE   circle_code='''||circlecode||''') '  ;       
end loop;
close c1;
END PRC_CREATETABLE;

No comments :

Post a Comment

Contact Us

Name

Email *

Message *