试图在oracle中完全删除表访问权限

问题描述 投票:0回答:3

我有一个简单的查询

select round(sum(a.wt)) as a_wt 
from db.abc a 
where a.date is null 
and a.col_no is not null 
and a.pod_cd = '367' 
and a.fant != a.rce

并且我想完全删除表访问权限。有3个索引,与下面的列组合类似,>]

  1. col_no
  2. col_no,date,fant,pyc
  3. wagno,batno
  4. 可以做些什么来完全删除表访问。enter image description here

我有一个简单的查询,从db.abc a中选择round(sum(a.wt))作为a_wt,其中a.date为null且a.col_no不为null且a.pod_cd ='367'和a.fant! = a.rce,我想删除表访问权限...

sql oracle query-performance
3个回答
0
投票

一个选项是创建Function Based Index


0
投票

通常,索引不索引空值,因此像]这样的条件>

select round(sum(wt)) as a_wt
  from abc
 where nvl("date",date'1900-01-01') = date'1900-01-01' -- matching means "date" column is null assuming there exists no records with this ancient date.
   and nvl(col_no,0) != 0 -- non-matching means "col_no" column is not null
   and pod_cd = 367
   and fant != rce

0
投票

索引可用于检查空值,并将两列相互比较。

© www.soinside.com 2019 - 2024. All rights reserved.