On Wednesday 31 October 2001 10:44 am, Richard W. Wood wrote:
> I've been trying to add the following table to my database, and I keep
> getting the error below.
>
> CREATE TABLE mod_userpage_data (
>    id INT(5) NOT NULL default '0',
>    title VARCHAR(200) NULL,
>    data LONGTEXT NULL,
>    PRIMARY KEY (id)
> );
>
> ERROR 1064 at line 1: You have an error in your SQL syntax near 'data
> LONGTEXT NULL,
>    PRIMARY KEY (id)
> )' at line 4
>

Richard,

Could you possibly have some strange characters in your source file (assuming 
that you are using one)?  Maybe something that an editor left behind.  I 
tried your example, verbatim and it worked on both an Alpha system and an 
Intel system running RedHat 7.1 and MySQL 3.23.38 (see below):

Logging to file 'test.results'
mysql> use test;
Database changed
mysql> create table mod_userpage_data (
    -> id INT(5) NOT NULL default '0',
    -> title VARCHAR(200) NULL,
    -> data LONGTEXT NULL,
    -> PRIMARY KEY (id)
    -> );
Query OK, 0 rows affected (0.00 sec)

mysql> show tables;
+-------------------+
| Tables_in_test    |
+-------------------+
| mod_userpage_data |
+-------------------+
1 row in set (0.00 sec)

mysql> describe mod_userpage_data;
+-------+--------------+------+-----+---------+-------+
| Field | Type         | Null | Key | Default | Extra |
+-------+--------------+------+-----+---------+-------+
| id    | int(5)       |      | PRI | 0       |       |
| title | varchar(200) | YES  |     | NULL    |       |
| data  | longtext     | YES  |     | NULL    |       |
+-------+--------------+------+-----+---------+-------+
3 rows in set (0.00 sec)

mysql> quit


mysqladmin  Ver 8.20 Distrib 3.23.38, for redhat-linux-gnu on alpha
Copyright (C) 2000 MySQL AB & MySQL Finland AB & TCX DataKonsult AB
This software comes with ABSOLUTELY NO WARRANTY. This is free software,
and you are welcome to modify and redistribute it under the GPL license

Server version          3.23.38
Protocol version        10
Connection              Localhost via UNIX socket
UNIX socket             /var/lib/mysql/mysql.sock
Uptime:                 1 day 59 min 37 sec

Threads: 2  Questions: 42  Slow queries: 0  Opens: 14  Flush tables: 1  Open 
tables: 3 Queries per second avg: 0.000

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