日期:2014-05-17 浏览次数:21217 次
--创建无参存储过程 CREATE OR REPLACE FUNCTION CreateTables RETURN VARCHAR2 IS --声明语句段 v_SQL varchar2(10000); BEGIN --执行语句段 /* Create by zjc 2012-06-29 指标分解总表*/ v_SQL := ' create table TB_TGT_DECOM_TABLES ( id VARCHAR2(40) not null, prod_type NUMBER(4), designer VARCHAR2(40), year NUMBER(5), name VARCHAR2(40), pro_comment VARCHAR2(200) ) '; execute immediate v_SQL; commit; END CreateTables; declare str varchar2(1000); CURSOR tname_cursor IS SELECT table_name FROM user_tables where table_name like 'TB_TGT_%'; begin CreateTables(); END;
SELECT table_name FROM user_tables where table_name like 'TB_TGT_%';
create table TB_TGT_DECOM_TABLES ( id VARCHAR2(40) not null, prod_type NUMBER(4), designer VARCHAR2(40), year NUMBER(5), name VARCHAR2(40), pro_comment VARCHAR2(200) )