Re: do i always have to have a primary key in a mysqltable?
Technically no.
However, you should always pick one for two reasons.
1. You need something to uniquely identify a row so you can do an update or
delete and only affect that row.
2. A primary key is also an index and without indexes, your database will be
much sloooooower.
|