[EMAIL PROTECTED] wrote:
>> De: [EMAIL PROTECTED]
>> Fecha: 27/05/2008 19:56
>>
>> It's not supposed to, according to
>> http://sqlite.org/lang_createtrigger.html . The syntax
>> only allows select, insert, update and delete statements.
>>
>> What are you trying to achieve?
>
> I need to handle tables with several million records, on realtime,
> from RAM. One of the fields takes few values (say, company website
> id), but new ids are added from time to time.  I would prefer to
> dynamically create a set of tables when a new id shows up, for the
> improved locality of reference plus reduced overhead from the website
> id and its non-unique index.

Even if CREATE TABLE were allowed inside a trigger, how did you plan to 
come up with unique table names? A table name must be an identifier, not 
a calculated expression. In other words, you can't do things like

CREATE TABLE 'prefix' || id ... ;
-- or
SELECT * FROM 'prefix' || id;

You would have to do all such statements in your application code, 
buidling the strings on the fly.

Igor Tandetnik 



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

Reply via email to