VAT law is very complex, and not uniform throughout the EC, when export is mentioned this applies only to a vehicle that is sold outside the EC.
If you are VAT registered and in a EC State (Country) you may take advantage of inter community trading laws which allow you to buy free of VAT from a like VAT registered person or business in another EC State, the VAT should then be payed on your normal quarterly VAT return, box 2 aquisitions from other EC member states.
However if VAT law in your resident country does not require you to pay VAT on a used private vehicle then this is one time you get a free lunch.
If it is a commercial vehicle you pay VAT on the invoice price at the rate in your own country, you can elect to pay it in the country of purchase if it is lower, but you can not claim it back in your quarterly VAT return unless you appoint a tax lawyer to act on your behalf in that country who will charge you circa 10% of the VAT recovered.
How the dealer accounts for his VAT is a whole different ball of wax.
Told you it was complex.