My Oracle Support Banner

SELECT FOR UPDATE Fails with ORA-02014 When Executed On A Nested Table Protected By RLS (Doc ID 452303.1)

Last updated on FEBRUARY 03, 2019

Applies to:

Oracle Server - Enterprise Edition - Version: to
Information in this document applies to any platform.


A SELECT FOR UPDATE query will fail with ORA-02014 when executed on a nested table protected by a Row Level Security (RLS) policy:


drop user foo cascade;
grant connect,resource to foo identified by foo;
grant execute on dbms_rls to foo;

connect foo/foo

create or replace function pf1 (oowner in varchar2,ojname in varchar2) return varchar2 as
return '(-29.0905=-29.0905))';

create type nst_typ as table of varchar2(10)
create table foo_tab(n number,ct nst_typ) nested table ct store as ct_tab;


select n from foo_tab for update;
select n from foo_tab for update
ERROR at line 1:
ORA-02014: cannot select FOR UPDATE from view with DISTINCT, GROUP BY, etc.


To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!

In this Document

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.