Caroline Jen wrote:

Hi, I tried to create a table.  This table has
seventeen fields.  My create table syntax gets too
long and I was only able to specify 5 fields at the
mysql prompt in the DOS window (DOS does not accept a
command beyond certain length).  How do I put the rest
12 fields in the table I just created?

mysql>CREATE TABLE message_thread (thread_id INTEGER
NOT NULL AUTO_INCREMENT PRIMARY KEY, message_receiver
VARCHAR(79) NOT NULL, message_sender VARCHAR(79) NOT
NULL, article_title VARCHAR(255) NOT NULL,
last_post_member_name VARCHAR(79) NOT NULL);

You don't have to put it all on one line. Just put whatever you want on the first line hit enter and put more on the next line..... until it is done. The prompt will change from mysql> to -> which is an indicator that mysql is waiting for more input. Bellow is an example from a create table I did recently.


The second section of Chapter 3 (MySQL Tutorial) of the manual tells all about how the prompt works. http://www.mysql.com/doc/en/Entering_queries.html

mysql> CREATE TABLE UserTest (
    ->  UserKey INT NOT NULL AUTO_INCREMENT,
    ->  UserID  CHAR(16) NOT NULL UNIQUE ,
    ->  Password        CHAR(16),
    ->  Email   VARCHAR(128),
    ->  Name    VARCHAR(20),
    ->  ShowEmail       BOOL,
    ->  PRIMARY KEY (UserKey)
    -> );


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



Reply via email to