Oracle Rownum cast Oracle Rownum cast oracle oracle

Oracle Rownum cast


you can use the cast function: cast( rownum AS NUMBER(10)) as row_id

create or replace view tvv as    select cast( rownum AS NUMBER(10)) as row_id    from all_objects    where rownum < 10;> desc tvv Name              Null?    Typ ----------------- -------- ------------ ROW_ID                     NUMBER(10)


Not really a good solution but by removing the rownum and working around the problem from a different angle I have removed the error.