select * from tab;
select table_name from user_tables;
select table_name from dba_tables;
select table_name from all_tables;

所以,当清空某个用户所有的表的记录时,可以使用下面的命令:

Begin
  For v_Table In (Select Table_Name From User_Tables Where Table_Name=×× ) Loop --××指明条件
    Begin
      Execute Immediate 'Truncate  Table ' || v_Table.Table_Name;
    Exception
      When Others Then
        Null;
    End;
  End Loop;
Exception
  When Others Then
    Null;
End;

获取表、字段的注释,涉及两个系统表:USER_TAB_COMMENTS 和USER_COL_COMMENTS;

评论
熟悉的陌生人 2007-05-21
fdg
发表评论

您还没有登录,请登录后发表评论