Training your dog to stay beside you whether you are on walks together or whether you are lounging around the coffee shop is a great trick to teach your dog. Dogs who often get the most attention out in public are the dogs who are the most well-behaved. Many people will comment on how well-behaved the dogs are and notice how they avoid distractions. Dogs who stay beside their owners have been trained to do so. They have been trained not only to obey their owners but also to respect them enough to stay with them no matter where they go and no matter what happens around them. If your dog is trained to stay beside you whether you were walking or relaxing, he will not be distracted by other animals or people around. This is an ideal situation whether you are walking through the neighborhood on a leash, at a dog park, or out downtown in dog-friendly restaurants.
Having your dog stay beside you starts with building confidence in your dog. He wants to please you, so he will work hard to do so. You are your dog's favorite person, so he wants to be near you. Dogs also thrive when owners set real boundaries. Setting a boundary with your dog of not allowing him to leave your side when you are out and about or when you were walking together will give him the confidence to be your best friend. You can use different keywords to let him know when it's time to leave together such as 'let's go' or 'come,' but ultimately you want to train your dog to stay with you whether you are walking or sitting. Though it's easier to teach puppies how to stay with you, older dogs can be taught as well. It just may take more time and repetition for your adult dog to understand.
To train your dog to stay beside you, your dog will need to start with a leash. Be sure to have lots of high-value tasty treats to keep your dog's attention as well, to reward him for a job well done. This is going to require a lot of repetitive training, so be prepared to set aside some time each day to train in short training sessions.