$L_2$-approximation by univariate splines