ITPub博客

首页 > Linux操作系统 > Linux操作系统 > sql

sql

原创 Linux操作系统 作者:ceo_lxy 时间:2008-06-02 15:30:25 0 删除 编辑

在同一资料库中复制表:
emp如何备份一张表
create table tab2
  as select * from apps.tab2

复制结构:  
create table tab2
  as select * from apps.tab2 where 1=2


在不同一资料库中复制表
1.先toad 中export table scripts 和table data两个scripts.sql,data.sql 两个文件。
2.再在pl/sql 中 @ e:\scrpts.sql,@ e:\data.sql


在pl/sql

 set serveroutput on;
 begin
 dbms_output.put_line('a');
 end;


SQL> declare
  2    v1        number;
  3  begin
  4    v1 := 0;
  5    <>
  6    if v1 <= 10 then
  7       v1 := v1 +1;
  8       dbms_output.put_line(to_char(v1));
  9       [color=-red]goto label1;
10    end if;
11  end;
12  /

来自 “ ITPUB博客 ” ,链接:https://blog.itpub.net/12122734/viewspace-329660/ ,如需转载,请注明出处,否则将追究法律责任。

上一篇: wip
请登录后发表评论 登录
全部评论

注册时间:2008-06-02

  • 博文量
    526
  • 访问量
    535850