51代码网ORACLEMYSQLSQL SERVER其它数据库java/jspasp/asp.netC/C++/VC++APP应用其它语言服务器应用
您现在的位置: 51代码网 >> oracle >> 文章正文

OACLE判断表是否存在,如何生成新表?

更新时间:2012-3-9:  来源:51代码网

declare IsTable  INTEGER:=0;
begin
select count(*) into IsTable from DBA_TABLES where table_name='NEDW_M_B_ADSL_D';
if IsTable=0 then
   create table NEDW_M_B_ADSL_D as
   select * from NEDW_M_B_ADSL_D@lnzd where rownum<=10;
else
   insert into NEDW_M_B_ADSL_D select * from NEDW_M_B_ADSL_D@lnzd where rownum<=10;
end if;
end;


execute immediate ' create table NEDW_M_B_ADSL_D as 
  select * from NEDW_M_B_ADSL_D@lnzd where rownum<=10'

  • 上一篇文章:
  • 下一篇文章: 没有了
  • 赞助商链接
    推荐文章
  • 此栏目下没有推荐文章
  • {
    设为首页 | 加入收藏 | 友情链接 | 网站地图 | 联系站长 |