Hi everyone,
     When creating a table I have a autonumber primary key, a varchar(30) field that 
is not null and another field that not null is not selected.  Here is the table 
creation command i used.

CREATE TABLE `TableName` (`ID` INT (3) UNSIGNED DEFAULT '0' NOT NULL AUTO_INCREMENT, 
`name` VARCHAR (30) NOT NULL, `place` CHAR (30), PRIMARY KEY(`ID`), UNIQUE(`ID`), 
INDEX(`ID`));

Now when i put data into the table i can't have all blanks which is right.  When i put 
data into the field that allows nulls the not null one gets '' as its data and goes 
on.  I though NULL and '' were the same thing.  Am i nuts?

INSERT INTO TableName (ID, name, place) VALUES (NULL, NULL, NULL);
gives me and error which is what I want

but
INSERT INTO TableName (ID, name, place) VALUES (NULL, '', NULL);

goes without any problem and i thought it should return and error also


      thanks for any help or comments

                    ,Michael


-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to