Re: MySQL: Add Autoincrement Field?
| From: | Hrishi | Date: | Sun, 18 Feb 2001 13:24:26 +0000 |
| Subject: | Re: MySQL: Add Autoincrement Field? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-40428@lists.php.net to get a copy of this message | ||
On Saturday 17 February 2001 10:20, Jeff Oien wrote:
>So if I want to delete
>a record by title, I'll end up deleting all songs with
>that title.
just for the discussion, you can use a delete query like
"delete from song_list where song_title='title' and song_book='book'"
to delete only one record, assuming that song names are unique per book.
however, with scalability and performance taken into consideration, an index
with a unique id makes a lot of sense. note that you can have only one
autoindex field per table as of mysql 3.22.*
cheers,
hrishi