Depends on what you're trying to do. If you want to ride your bike outside, then you are better off riding the same bike inside, too. If you are riding for long periods, then the way the bike fits you will become increasingly important. You can get repetitive stress injury from an ill-fitting bike. An exercise bike will never fit you like your real bike.
There is an issue with mountain bike tires on trainers. You can either put on smooth tires or get a trainer that works off the rim instead of the tire.