For Programmers: Free Programming Magazines  


Home > Archive > PHP DB > October 2005 > Re: [PHP-DB] NOT NULL - newbie









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Re: [PHP-DB] NOT NULL - newbie
Constantin Brinzoi

2005-10-05, 7:57 am

Hi!

I think that "NOT NULL" comes together with "PRIMARY KEY" and not with
"AUTO_INCREMENT".
Follow this link http://dev.mysql.com/doc/mysql/en/create-table.html for
detailed information about creating tables in MySQL.

Have a nice day!
Aurel


On Wed, 2005-10-05 at 12:15 +0200, W Roothman wrote:

> Dear All,
>
> When declaring values for an identifier with unsigned auto_increment, is it necessary to include NOT NULL?
>
> my_id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
>
> or
>
> my_id INT NOT NULL UNSIGNED AUTO_INCREMENT PRIMARY KEY,
>
> Regards,
>
> Will


Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com