Mario Frasca a écrit :
Cécilia Vigny wrote:

With MySQL, it's possible to declare an index in CREATE TABLE, using KEY, like in this example :

CREATE TABLE  table_name (
 id int(6) NOT NULL auto_increment,
 field_name date default NULL,
 PRIMARY KEY  (id),
 KEY idx_field_name (fieldname),
) ;

I want to know if there is an equivalence with SQLite ?

maybe this is what you want:

CREATE TABLE  table_name (
id integer PRIMARY KEY NOT NULL,
field_name date default NULL
) ;
CREATE INDEX idx_field_name ON table_name(field_name);

also: have a look at http://www.sqlite.org/lang.html (SQL As Understood By SQLite)

(editing your code you forgot an underscore and left an extra comma)

regards,
Mario

Thank you for your correction, it is just a piece of my code that I had changed for the instance so it's not a problem, but shame on me ;) What you suggest is what I had thought, I wondered whether there were not a solution which make it possible to do with just one request...
I think that I will use CREATE INDEX separately.

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------



Ce message est protégé par les règles relatives au secret des correspondances. 
Il est donc établi à destination exclusive de son destinataire. Celui-ci peut 
donc contenir des informations confidentielles. La divulgation de ces 
informations est à ce titre rigoureusement interdite. Si vous avez reçu ce 
message par erreur, merci de le renvoyer à l'expéditeur dont l'adresse e-mail 
figure ci-dessus et de détruire le message ainsi que toute pièce jointe.

This message is protected by the secrecy of correspondence rules. Therefore, 
this message is intended solely for the attention of the addressee. This 
message may contain privileged or confidential information, as such the 
disclosure of these informations is strictly forbidden. If, by mistake, you 
have received this message, please return this message to the addressser whose 
e-mail address is written above and destroy this message and all files attached.



-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to