custom table view: delete/edit row D7
So first of all you want a page callback to handle the deleting. You either want to use confirm_form() or add a token to the link to avoid CSRF. node.module does the former, so I'd go with core. You can also use that as a reference: node_menu() (look for $items['node/%node/delete']), node_delete_confirm(), node_delete_confirm_submit().

Regarding the actual deleting, this page has some instructions. Please update the Q if you have specific issues.

Here's an example, not tested:

/**
 * Implements hook_menu().
 */
function MYMODULE_menu() {
  $items['MYMODULE/%/delete'] = array(
    'title' =&gt; 'Delete',
    'page callback' =&gt; 'drupal_get_form',
    'page arguments' =&gt; array('MYMODULE_delete_confirm', 1),
    'access arguments' =&gt; array('PERMISSION_TO_CHECK'),
  );

  return $items;
}

/**
 * Form function returning a delete thingy confirmation form.
 */
function MYMODULE_delete_confirm($form, &amp;$form_state, $id) {
  $form['#MYMODULE']['id'] = $id;

  $name = MYMODULE_get_name_from_id($id);

  return confirm_form($form,
    t("Are you sure you want to delete %name?", array('%name' =&gt; $name)),
    '&lt;front&gt;',
    t("This action cannot be undone."),
    t("Delete"),
    t("Cancel")
  );
}

/**
 * Submit handler for MYMODULE_delete_confirm.
 */
function MYMODULE_delete_confirm_submit($form, &amp;$form_state) {
  if (isset($form['#MYMODULE']['id'])) {
    $id = $form['#MYMODULE']['id'];
    db_delete('MYMODULE_thingy')
      -&gt;condition('id', $id)
      -&gt;execute();
  }
}

/**
 * Loads the name of the thingy from its id.
 */
function MYMODULE_get_name_from_id($id) {
  return 'thingy ' . $id;
}