1.查看实例名:
select INSTANCE_NAME from v$instance;
2.case when +in用法
(应用场景:查询某表某一字段的数据是否存在于另一个表,若分成两个表,跟据主表字段再用for循环count(字段)查询另一个表,再SET count出的结果,效率较低)
select t1.*,case when t1.pjglzhm in(select pjglzhm from t_pj_glzzx) then 1 else 0 end zxbz from t_gg_zsdw t1