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_INCREMENT,
             name CHAR(30) NOT NULL,
             PRIMARY KEY (id)
             );
that they say the id col is not null, but do they have to since they've 
already defined it to be a primary key?

Thanks

Desmond




sql

_________________________________________________________________
Chat with friends online, try MSN Messenger: http://messenger.msn.com


---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to