Select Count(*) From user_objects where object_name='???';

解决方案 »

  1.   

    所有的表,字段,包等在oracle的数据字典里都有
      

  2.   

    Select Count(*) From user_objects where object_name='TableName';
    显示是0个,但表是存在的呀?
      

  3.   

    谁能告诉我一个select语句,急!
      

  4.   

    把TableName全改为大写就可以了,但是Oracle里面的表名都是大写吗,如果不都是大写那该怎么办
    快点回复啊,我想结贴了
      

  5.   

    user_objects 里面的表名都是大写的。
      

  6.   

    但是Oracle里面的表名都是大写吗??   是的
    你可以查询user_objects,dba_objects,all_objects数据字典
      

  7.   

    那你就用函数先把表名转换为大写呀
    Select Count(*) From user_objects where object_name=Upper('TableName');

    Select Count(*) From all_tables where table_name=Upper('TableName');
      

  8.   

    这样也可以呀!
    Select Count(*) From all_tables where Upper(table_name)=Upper('TableName');
      

  9.   

    支持9i写法:一条语句判断存在更新否则插入
    merge into table1 a
    using(select * from table2 b) 
    on (a.id=b.id) 
    when matched then 
    update set fno='old' 
    when not matched then 
    insert into values(a.id,'new');