How to manually delete a node from the database knowing its id
You should use node_delete:

&lt;?php
$nid='22'; // $node id , which you want to delete;
node_delete($nid);
?&gt;


This function from the API does the necessary cleaning up when a node is deleted.

You can stick this in a custom module, or enable the PHP filter and just have it a node where you allow PHP code.

If you use the PHP Filter method, remember to disable it when done.  You don't want it permanently enabled on a production site.

You may also want to repair your database, just to make sure.  The screenshot below shows how to use phpMyAdmin to repair the {sessions} table.  You can also use to repair the {node} table