Question: how to train dog not to take food from table?
Answer: Reward him with a treat when he obeys and start replacing treats with praise and attention. Use the 'leave it' command when your dog approaches the table or people food. Having established the 'leave it' behavior, your dog should avoid the food. Be sure to praise him as a reward.