Amer,
Monday, May 13, 2002, 2:03:28 AM, you wrote:

AN> Win/98
AN> MySQL 3.23.46

AN> I'm trying to use AUTO_INCREMENT=1000 to specify my staring value in an
AN> ID column in batch mode, but it doesn't want to work. I can get it to
AN> work in interactive mode though.

AN> In a file (create_tables.sql) I have:

AN> CREATE TABLE Respondents (UserID SMALLINT UNSIGNED AUTO_INCREMENT NOT
AN> NULL PRIMARY KEY, 
AN>                           UserLastName VARCHAR(25) NOT NULL,
AN>                           UserFirstName VARCHAR(20) NOT NULL,
AN>                           UserEmail VARCHAR(60) NOT NULL,
AN>                           UserPhoneAC CHAR(3) NOT NULL,
AN>                           UserPhoneNum VARCHAR(8) NOT NULL,
AN>                           UserPhoneExt VARCHAR(5),
AN>                           UserLevel VARCHAR(20) NOT NULL,
AN>                           UserFoundBy VARCHAR(40) NOT NULL,
AN>                           KeyDM ENUM('Y','N') NOT NULL,
AN>                           DMPositionTitle VARCHAR(30) NOT NULL,
AN>                           IPAddr VARCHAR(15) NOT NULL,
AN>                           IPName VARCHAR(100))
AN>                           AUTO_INCREMENT=1000;

AN> which I am then loading into mysql like this:

AN> c:\mysql\data\mydb mysql mydb < create_tables.sql

AN> No errors, but when I populate the table with values (also from a file),
AN> the values for UserID start at 1, not 1000.

I guess that your UserID in the file begins from 1, not from 1000. You
can get values that are starting from 1000, if you insert into column
NULL or 0 or if you insert values from 1000 manually :)

AN> The values I'm inserting for
AN> UserID are all 'null' (without quotes).

How did you inserted values? Manually or from a file?





-- 
For technical support contracts, goto https://order.mysql.com/?ref=ensita
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