David,
Thursday, March 07, 2002, 7:22:49 PM, you wrote:

DMP> Is there a way for me to NOT have a default value for a column in a table
DMP> that I define as NOT NULL?

DMP> EXAMPLE SQL:

DMP> mysql> CREATE TABLE FOO (foo1 int NOT NULL);
DMP> Query OK, 0 rows affected (0.05 sec)

DMP> mysql> DESCRIBE FOO;
DMP> +-------+---------+------+-----+---------+-------+
DMP> | Field | Type    | Null | Key | Default | Extra |
DMP> +-------+---------+------+-----+---------+-------+
DMP> | foo1  | int(11) |      |     | 0       |       |
DMP> +-------+---------+------+-----+---------+-------+
DMP> 1 row in set (0.00 sec)

DMP> mysql>

DMP> I don't want the default to be 0 (zero)....  Any ideas?

Specify another default value in CREATE TABLE.
  foo1 INT NOT NULL DEFAULT 1;




-- 
For technical support contracts, goto https://order.mysql.com/
This email is sponsored by Ensita.net http://www.ensita.net/
   __  ___     ___ ____  __
  /  |/  /_ __/ __/ __ \/ /    Victoria Reznichenko
 / /|_/ / // /\ \/ /_/ / /__   [EMAIL PROTECTED]
/_/  /_/\_, /___/\___\_\___/   MySQL AB / Ensita.net
       <___/   www.mysql.com




---------------------------------------------------------------------
Before posting, please check:
   http://www.mysql.com/manual.php   (the manual)
   http://lists.mysql.com/           (the list archive)

To request this thread, e-mail <[EMAIL PROTECTED]>
To unsubscribe, e-mail <[EMAIL PROTECTED]>
Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php

Reply via email to