On Tue, May 31, 2011 at 2:00 PM, Richard Hipp <d...@sqlite.org> wrote:

> The LIMIT in a scalar subquery is always ignored.  A scalar subquery
> operates with a LIMIT of 1 regardless of any LIMIT that you might specify.
> That means the @p1 is optimized out - it does not appear in the generated
> code for the prepared statement.  Any parameter that is optimized out
> becomes an anonymous parameter for which sqlite3_bind_parameter_name
> returns
> NULL.
>

Strictly out of curiousity: if the bound parameter is in a "legal" position
within a substatement, it is still valid for purposes of bind_parameter(),
or may only parameters in the main expression be named? e.g. if @p1 had been
part of the WHERE clause in a subselect?

-- 
----- stephan beal
http://wanderinghorse.net/home/stephan/
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to