Jean-Christophe Deschamps <j...@q-e-d.org>
wrote:
> I've been surprised that the following syntax doesn't work and returns
> "3 values for 4 columns" diagnose message.  I'm just asking by
> curiosity.
>
> INSERT INTO t (a, b, c, d) VALUES ('aa', 'bb', (SELECT c, d FROM t
> WHERE <cond>));
>     with <cond> guaranteed to select exactly one row.

I don't know of any DBMS where this would be valid. Make it

INSERT INTO t(a, b, c, d)
SELECT 'aa', 'bb', c, d FROM t WHERE <cond>;

Igor Tandetnik 



_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to