VIES is an electronic tool for transmitting information relating to VAT registrations (= validity of VAT numbers) of companies registered in the EU. Furthermore, information relating to (tax exempt) intra-Community supplies between Member States’ administrations is also transmitted via VIES. For details see link below:
However if you think that you will find VAT number of all companies registered in the EU, you are wrong.
VAT numbers such as the following EU123456789 are not included.
Such formats are not included in the VIES database, even though it is supposed to include the VAT registration numbers of all companies registered in the EU. Apparently, this is the VAT number prefix for companies, which are getting registered under the non-Union scheme, i.e. this applies to all non-EU resident companies.