Cursor for updating table in sql oracle