Ask Bjørn Hansen wrote: >Note the "" default to "foo". > >MySQL, correctly, says the default is NULL: > >mysql> show create table bars\G >*************************** 1. row *************************** > Table: bars >Create Table: CREATE TABLE `bars` ( > `id` int(10) unsigned NOT NULL, > `foo` varchar(255) NOT NULL, > PRIMARY KEY (`id`) >) ENGINE=InnoDB DEFAULT CHARSET=latin1 > >mysql> select * from information_schema.columns where table_schema = >'ntppool' and table_name = 'bars' and column_name = 'foo' \G >*************************** 1. row *************************** > TABLE_CATALOG: NULL > TABLE_SCHEMA: ntppool > TABLE_NAME: bars > COLUMN_NAME: foo > ORDINAL_POSITION: 2 > COLUMN_DEFAULT: NULL > IS_NULLABLE: NO > DATA_TYPE: varchar >CHARACTER_MAXIMUM_LENGTH: 255 > CHARACTER_OCTET_LENGTH: 255 > NUMERIC_PRECISION: NULL > NUMERIC_SCALE: NULL > CHARACTER_SET_NAME: latin1 > COLLATION_NAME: latin1_swedish_ci > COLUMN_TYPE: varchar(255) > COLUMN_KEY: > EXTRA: > PRIVILEGES: select,insert,update,references > COLUMN_COMMENT: >1 row in set (0.03 sec) > > There seems to be a contradiction in the create statement "foo ... NOT NULL" and the default expectation of "NULL".
I'm surprised that mySQL specifies a default of "NULL" in this case. "" seems like a more reasonable response. So, is this a problem with mySQL or with your create statement or RDBO? (Speaking as a fan of mySQL since it's the only DB I've been using the past 7 years.) Take care, Kurt -- Kurt Hansen CharityWeb [EMAIL PROTECTED] 866 4eTools (866 438-6657) "Our laws set us free." - Anon ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys-and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Rose-db-object mailing list Rose-db-object@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/rose-db-object