  We derive the mass-metallicity relation of star-forming galaxies up to
$z\sim0.9$, using data from the VIMOS VLT Deep Survey. Automatic measurement of
emission-line fluxes and equivalent widths have been performed on the full
spectroscopic sample. This sample is divided into two sub-samples depending on
the apparent magnitude selection: wide ($I_{\mathrm{AB}}<22.5$) and deep
$I_{\mathrm{AB}}<24$). These two samples span two different ranges of stellar
masses. Emission-line galaxies have been separated into star-forming galaxies
and active galactic nuclei using emission line ratios. For the star-forming
galaxies the emission line ratios have also been used to estimate gas-phase
oxygen abundance, using empirical calibrations renormalized in order to give
consistent results at low and high redshifts. The stellar masses have been
estimated by fitting the whole spectral energy distributions with a set of
stellar population synthesis models. We assume at first order that the shape of
the mass-metallicity relation remains constant with redshift. Then we find a
stronger metallicity evolution in the wide sample as compared to the deep
sample. We thus conclude that the mass-metallicity relation is flatter at
higher redshift. The observed flattening of the mass-metallicity relation at
high redshift is analyzed as an evidence in favor of the open-closed model.
