Re: auto_increment
| From: | Jamie Alessio | Date: | Thu, 26 Oct 2000 23:04:31 +0000 |
| Subject: | Re: auto_increment | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-3972@lists.php.net to get a copy of this message | ||
> INSERT INTO test VALUES (my_autoinc.nextval,'bla');
>
> my_autoinc.currval gives you the current value of the sequence. Of course
> you should make one sequence for each table, if you don't want "holes" in
> your values ...
>
You can also use a trigger to insert the auto incremented value so you don't
have to deal with it at all when doing inserts.
- Jamie