Update rows in a table with an index column starting from 0 with consecutive numbers
To update the values in the table, you can use a MERGE statement (alter is for changing the structure of a table, not for changing values. That is done with UPDATE or MERGE)

merge into anexe_h_rows 
using (
  select id, 
         row_number() over (partition by h_id order by nrcrt) as rn
  from anexe_h_rows
) t ON (t.id = anexe_h_rows.id)
when matched then 
  update set nrcrt = rn, index_column = rn - 1;


This assumes that anexe_h_rows.id is the primary key of that table. 

It also assumes that value for the column nrcrt is always one bigger than the one for index_column (which raises the question why you have both - because one can easily be derived from the other).