Why, when I create a table as follows:

mysql> create table requestid ( request_id int not null default 1, constraint requestid_innodb_pk_cons primary key(request_id) ) ENGINE=InnoDB;
Query OK, 0 rows affected (0.02 sec)


Do I get the following?

mysql> select request_id from requestid;
Empty set (0.01 sec)

When I do a show create table I see:

mysql> show create table requestid;
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------+
| requestid | CREATE TABLE `requestid` (
  `request_id` int(11) NOT NULL default '1',
  PRIMARY KEY  (`request_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 |
+-----------+----------------------------------------------------------------------------------------------------------------------------------------------+
1 row in set (0.00 sec)

Shouldn't I be getting back a '1' when I do my select??? Why am I getting an empty set? What am I not understanding? How do I create a table with a starting value of '1' or '0' for an int???

Thanks


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

Reply via email to