那你就用函数先把表名转换为大写呀 Select Count(*) From user_objects where object_name=Upper('TableName'); 或 Select Count(*) From all_tables where table_name=Upper('TableName');
这样也可以呀! Select Count(*) From all_tables where Upper(table_name)=Upper('TableName');
支持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');
显示是0个,但表是存在的呀?
快点回复啊,我想结贴了
你可以查询user_objects,dba_objects,all_objects数据字典
Select Count(*) From user_objects where object_name=Upper('TableName');
或
Select Count(*) From all_tables where table_name=Upper('TableName');
Select Count(*) From all_tables where Upper(table_name)=Upper('TableName');
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');