Hi all, Peter!

Sujay Koduri wrote:
You havent specified the datatype for the column 'id'.

Right, this should be fatal.
But I also take issue with other parts:


[[...]]

-----Original Message-----
From: Peter Matulis [mailto:[EMAIL PROTECTED] Sent: Tuesday, November 15, 2005 10:57 AM
[[...]]

Hello, I am using MySQL 4.0.24 on OpenBSD 3.8.

I am having difficulty creating a SQL schema.  My attempts contain lines
like:

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.

  [[...]]


Regards,
Joerg

--
Joerg Bruehe, Senior Production Engineer
MySQL AB, www.mysql.com

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

Reply via email to