From: Paul DuBois Date: March 17 1999 8:38pm Subject: Re: Error with batch files List-Archive: http://lists.mysql.com/mysql/449 Message-Id: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" At 2:28 PM -0600 3/17/1999, Levy Carneiro Jr. wrote: > Hi, > > I maked a batch file with SQL commands to create a table in a >database. Here is a example from the file: > >------ here begins ------ > ># batch.mysql >CREATE TABLE document_config_table ( > body_bg_color text(999), > body_background_file text(999), > body_text_color text(999), > body_link_color text(999), > body_vlink_color text(999), > body_alink_color text(999), > document_id double, > horde_user_id double(FK) (IE) >); > >------ here ends ------ > > When I tries the following command appears an error: > >[server:~] mysql table_name -p < batch.mysql >Enter password: ******** >ERROR 1064 at line 4: You have an error in your SQL sysntax near '(999), > body_background_file text(999), > body_text_color text(999), > body_lin' at line 2 >[server:~] > > Does somebody know what is wrong? The TEXT type doesn't take a length. Use TINYTEXT, TEXT, MEDIUMTEXT, or LONGTEXT, depending on the maximum length you require. See chapter 7 of the MySQL manual for discussion of TEXT types and storage requirements. By the way, what is "horde_user_id double(FK) (IE)" in your CREATE TABLE statement supposed to indicate? -- Paul DuBois, paul@stripped Northern League Chronicles: http://www.snake.net/nl/