title: Assign Value to a Nested Table without Looping
body: <p>say i have the table <code>XX_TEST_DATA</code> and its being used to populate a nested table inside a PL/SQL block below (please note the comments):</p>
  
  <pre><code>DECLARE
  
      CURSOR XX_DATA_CUR
      IS
      SELECT  *
      FROM    XX_TEST_DATA;
  
      TYPE TYP_XX_TEST IS TABLE OF XX_TEST_DATA%ROWTYPE INDEX BY PLS_INTEGER;
      XX_REC  TYP_XX_TEST;
  
  BEGIN
      OPEN    XX_DATA_CUR;
      FETCH   XX_DATA_CUR
      BULK COLLECT 
      INTO    XX_REC;
      CLOSE   XX_DATA_CUR;
  
      for i in 1..XX_REC.count loop
  
          XX_REC(i).BATCH_NAME := 'Batch 1'; -- This is the Line
  
      end loop;
  
  END;
  </code></pre>
  
  <p>I would like to assign the value "Batch 1" to ALL records inside the nested table. Would this be possible without looping through all the records?
  Something like below:</p>
  
  <pre><code>BEGIN
      OPEN    XX_DATA_CUR;
      FETCH   XX_DATA_CUR
      BULK COLLECT 
      INTO    XX_REC;
      CLOSE   XX_DATA_CUR;
  
      XX_REC.BATCH_NAME := 'Batch 1'; -- 
  
  END;
  </code></pre>
  
  <p>I know the above block would not work, but I was hoping to achive something like that.</p>
  
  <p><strong>DDL of the Test Table</strong></p>
  
  <pre><code>Create table XX_TEST_DATA
  (
      XX_ID          NUMBER
  ,   XX_DATA1       VARCHAR2(100)
  ,   XX_DATA2       VARCHAR2(100)
  ,   BATCH_NAME  VARCHAR2(100)
  );    
  </code></pre>