List:General Discussion« Previous MessageNext Message »
From:Jim Faucette Date:May 21 1999 4:39pm
Subject:Re: INSERT
View as plain text  
Sandrine C. wrote:
> 
> Just a little question :
> how to insert several tuples at the same time
> i do :
> insert into lexique values (
>         ('0','handicape','personne non valide', '1999-01-01'),
>         ('1','tt','bla bla', '')
>         );
> 
> but it doesnt work. what is the correct sentence?

Tim handled this one.

> 
> my table is :
> mysql> desc lexique;
> +---------------+-------------+------+-----+---------+----------------+
> | Field         | Type        | Null | Key | Default | Extra          |
> +---------------+-------------+------+-----+---------+----------------+
> | LE_Code       | varchar(4)  |      | PRI |         | auto_increment |
> | LE_Nom        | varchar(80) | YES  |     | NULL    |                |
> | LE_Definition | text        | YES  |     | NULL    |                |
> | LE_DateMAJ    | date        | YES  |     | NULL    |                |
> +---------------+-------------+------+-----+---------+----------------+
> 4 rows in set (0.00 sec)
> 
> by the way, even if there is an autoincrement, i have to write it by hand
> no?? otherwise my primary key woould be consider as null, and be rejected!
> no?
> 

No, but you do need to change the auto_increment field to an int.

  jim...
Thread
INSERTSandrine C.21 May
  • Re: INSERTThimble Smith21 May
  • Re: INSERTJim Faucette21 May
Re: INSERTRuprecht Helms21 May
  • Date prior to EpochShalendra Majmundar24 May
    • RE: Date prior to EpochDon Read25 May