获取跟一个用户有关的所有的表,但是必须排除系统表和oracle中自带的一些例子的表,像SYS,CTXSYS等这些用户的表都要排除,谢谢各位了。

解决方案 »

  1.   

    select * from all_tables where owner not in ('SYS','SYSTEM')
      

  2.   

    select * from all_tab_columns a where a.owner in ('用户一','用户二'....)
      

  3.   

    如果是这样,就用
    select * from all_tables a where a.owner='username'
      

  4.   

    先根据select * from all_users;
    找到系统用户创建的最大时间(一般是oracle安装的日期)
    然后
    select  *  from  all_tables  where  owner  not  in  
    (select username from all_users 
    where created>to_date(....));
      

  5.   

    select * from all_tables a where a.owner='username'
      

  6.   

    select * from all_tables a where a.owner=upper('username');
      

  7.   

    同意bzszp(www.bzszp.533.net) 
    但应该是in不是not in吧?select  *  from  all_tables  where  owner  in  
    (select username from all_users 
    where created>to_date(oracle create date));
      

  8.   

    同意xhy818(zh1860 
    应该是in不是not in吧?select  *  from  all_tables  where  owner  in  
    (select username from all_users 
    where created>to_date(oracle create date));