Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
一个表包含 2 个分区,即 x,y
我们必须使用不是常量值的变量来查询表,并且基于这些变量必须从 x 或 y 分区中获取数据
如果 Var =1 我们必须点击 x 分区,如果 var=2 我们必须点击 y 分区
就像是:
begin var :=&var delete table partition(&var) where varaibles =some values end;
我遇到了一个问题“非法分区使用”
我们可以通过替换值来动态命中分区吗
如果要指定分区名称,则需要使用动态 SQL。
但是,您几乎不需要显式指定分区名称。假设您的WHERE子句包括对表分区的任何列的谓词,Oracle 将自动执行适当的分区修剪,以便它只需要命中数据存在的特定分区或分区。
WHERE