I think you have intercepted the SQL incorrectly, or there is something missing, because that is not a valid construct
SQL> create table tab as
2 select object_id as col from all_objects
3 where rownum exec dbms_stats.gather_table_stats(ownname=>user, tabname=>'TAB');
where rownum exec dbms_stats.gather_table_stats(ownname=>user, tabname=>'TAB')
*
ERROR at line 3:
ORA-00920: invalid relational operator
In particular, the 'exec' command applies to the SQLPlus tool only, not general SQL.
If I had to guess, the command has been truncated, so someone ran something like:
SQL> create table tab as
2 select object_id as col from all_objects
3 where rownum <= 1000;
SQL> exec dbms_stats.gather_table_stats(ownname=>user, tabname=>'TAB');
and only the bit up to the "rownum" got picked up.
Hope this helps.