OS:             Win2K
MySQL:  3.23.51
What:   CREATE TABLE
Problem:        Column specification not honoring NOT NULL specifier.


CREATE TABLE PFPBaseRequest
(
        # Uniquely identify this record
        id                      INTEGER NOT NULL AUTO_INCREMENT,
        trx_type                CHAR(1) NOT NULL,
        tender                  CHAR(1) NOT NULL,
        req_date                DATETIME NOT NULL,
        amt                     DECIMAL(16,2) NOT NULL,
        PRIMARY KEY (id)
);


mysql> describe pfpbaserequest;
+----------+---------------+------+-----+---------------------+----------------+

| Field    | Type          | Null | Key | Default             | 
Extra          |

+----------+---------------+------+-----+---------------------+----------------+

| id       | int(11)       |      | PRI | NULL                | 
auto_increment |

| trx_type | 
char(1)       |      |     |                     |                |

| tender   | 
char(1)       |      |     |                     |                |

| req_date | datetime      |      |     | 0000-00-00 00:00:00 
|                |

| amt      | decimal(16,2) |      |     | 
0.00                |                |

+----------+---------------+------+-----+---------------------+----------------+

5 rows in set (0.00 sec)

mysql> insert into pfpbaserequest (tender) values('X');
Query OK, 1 row affected (0.00 sec)

mysql> select * from pfpbaserequest;
+----+----------+--------+---------------------+------+
| id | trx_type | tender | req_date            | amt  |
+----+----------+--------+---------------------+------+
|  1 |          | X      | 0000-00-00 00:00:00 | 0.00 |
+----+----------+--------+---------------------+------+
1 row in set (0.00 sec)


---------------------------------------------------------------------
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