Table salt is a chemical compound. Its chemical name is sodium chloride. It is present in the bloodstream in solution as sodium ions and chloride ions. It is the sodium ions that are involved in the fluid retention that causes weight gain. This webpage tells you more about sodium in food.
Amitriptyline does not contain salt. But amitriptyline weakens the walls of the blood vessels so that extra sodium ions and the water associated with them can distend the blood vessels so that they hold a greater blood volume than before. - The blood has been diluted a bit with the sodium ions and water. This is an example of fluid retention and an example of one of the many medications that cause it by weakening the walls of the blood vessels.
If you want to get the hang of it better, I suggest you read http://www.wildeaboutsteroids.co.uk/lose_weight.html and http://www.wildeaboutsteroids.co.uk/obesity_and_the_salt_connection.html
If you want to get the hang of it better, I suggest you read http://www.wildeaboutsteroids.co.uk/lose_weight.html and http://www.wildeaboutsteroids.co.uk/obesity_and_the_salt_connection.html