Hello sqlite list!
The following statement gives an error in sqlite 3.8.4.3.
CREATE VIEW vp AS SELECT ? AS x;
The error message is:
Error: parameters are not allowed in views
The parameter (placeholder) is definitely be the problem here, because
this similar statement executes without error.
CREATE VIEW vs AS SELECT 'flt' AS x;
This error seems reasonable, but I can't find anything about it in
documentation. Could you tell me where the documentation explains
where exactly I can use parameters (bound parameters, variables,
placeholders, question marks) in an expression? In particular,
whether it is valid to use a placeholder in any of the following.
- The SELECT part in a CREATE VIEW statement.
- The default values of columns in a CREATE TABLE statement.
- The CHECK constraint expressions in a CREATE TABLE statement.
- The trigger conditions after WHEN in a CREATE TRIGGER statement.
- Inside statements in a trigger.
As a special case, the documentation already tells that parameters are
invalid in conditions for partial indexes in a CREATE INDEX statement.
-- Ambrus
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users