In article <[EMAIL PROTECTED]>,
Joerg Bruehe <[EMAIL PROTECTED]> writes:
>> CREATE TABLE users (
>> id PRIMARY KEY,
>> priority integer NOT NULL DEFAULT '7',
>> policy_id integer unsigned NOT NULL DEFAULT '1',
> Even though this may work, it is wrong IMNSHO:
> You set character strings as default values for numeric columns!
> Your strings consist of digits only, so they can (and will) be
> converted to numbers, but IMO you should not make use of that.
You're right, but MySQL thinks otherwise:
CREATE TABLE t1 (
val INT NOT NULL DEFAULT 42
);
SHOW CREATE TABLE t1;
returns
CREATE TABLE `t1` (
`val` int(11) NOT NULL default '42'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_german1_ci
on 5.0.15.
--
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]