Rat terriers were bred to work and are high-energy dogs. They require at least 30 minutes of exercise daily. Without sufficient exercise, a rat terrier will be bored, and may be destructive. These dogs enjoy digging, and can cause damage to a yard as they go after an interesting scent. They can also use those digging skills to tunnel under a fence, unless the fence was installed with sufficient barriers against that possibility. The larger rat terriers also may find ways to get over fences if the attraction is strong enough. Always supervise your rat terrier outdoors, and make sure your dog always wears identification.
Setting up a sandbox where a rat terrier can satisfy the innate drive to hunt and dig may help to spare the backyard some unwanted excavations, but if there is real prey to go after -- a mole or a mouse, for example -- it is unlikely the sandbox will be a sufficiently enticing alternative to the hunt.
Keep your rat terrier on a leash during outings beyond the confines of the fenced yard; this dog can easily detect potential prey and give chase without warning.
Indoors, rat terriers are known for being good house dogs. They are content to be with their owner, and are easily housebroken. If you must leave your rat terrier alone at home, it is a good idea to leave some indestructible treat-filled puzzle toys to occupy the time and help prevent destructive behaviors.