|Dynamic Binds Using Contexts - Simplify dynamic variable binds within dynamic SQL using contexts.|
Charlie 木匠 said...A better solution:
here is the new approach:
14 if ( p_ename is NOT NULL )
16 l_query := l_query ||
17 ' where ename like
18 ''%''||:p_ename||''%'' ';
20 l_query := l_query ||
21 ' where (1=1 or
22 :p_ename is null) ';
23 end if;
That approach has been around for a while now. I would describe it as a "different" approach, rather than a "better" one. Each have their positive and negative points.
DO NOT ask technical questions here! They will be deleted!
These comments should relate to the contents of a specific article. Constructive criticism is good. Advertising and offensive comments are bad and will be deleted!