Re: do you need to define not null and unique?

2002-07-29 Thread Paul DuBois
At 16:32 -0700 7/29/02, Desmond Lee wrote: >Hello > > >Just wnated to calrify something here. > >If you define your id in a table to be a primary key, do you also >need to define it as 'NOT NULL' and 'UNIQUE'. > >I've notice in some examples like the following off the mysql site: >CREATE TABLE an

do you need to define not null and unique?

2002-07-29 Thread Desmond Lee
Hello Just wnated to calrify something here. If you define your id in a table to be a primary key, do you also need to define it as 'NOT NULL' and 'UNIQUE'. I've notice in some examples like the following off the mysql site: CREATE TABLE animals ( id MEDIUMINT NOT NULL AUTO_INCR