Replacing the updated module in drupal 7 without effecting the database from previous module? I have seen that whenever we apply patch to a module, without reinstalling the module, new updates of the module won't be reflected.
The problem is reinstalling the module will truncate the module related tables in the database. Is there any other way, so that we can replace the updated module without effecting the data from previous module?

Thank you in advance.
That's what hook_update_N is used for:


  For each change that requires one or more actions to be performed when updating a site, add a new hook_update_N(), which will be called by update.php. The documentation block preceding this function is stripped of newlines and used as the description for the update on the pending updates task list. Schema updates should adhere to the Schema API.


e.g. Adding a new column to a table:

function MYMODULE_update_7100() {
    db_add_field('foo_table', 'bar_col', array(
      'type' =&gt; 'varchar', 
      'length' =&gt; 255,
      'not null' =&gt; TRUE, 
      'description' =&gt; 'My new integer column.'
    ));
}