use anine
create table newest_product(Item_no char(20),Type char(20),Available_color char(50),Product_info1 char(800),Service char(800),Size char(20),Sheet char(20),Package char(20),Cover_material char(50),Cnt_size char(30),Gw char(20),Small_picture char(100),Middle_picture char(100),Larger_picture char(100),Corner_picture char(100),Edge_picture char(100),stocks int,Ttime datetime,Page_size char(20),Available char(20),Product_info2 char(800),Product_info3 char(800),Product_info4 char(800),Product_info5 char(800),Product_info6 char(800));
这是我的建表语句,大家帮我改下,我以前用的是sql,mysql一点也不会,工作需要,时间紧,现在要用,错误提示是:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'create table newest_product(Item_no char(20),Type char(20),Available_color char(' at line 2
(耗费 0 ms)

解决方案 »

  1.   

    Available_color char(50) 这段是不是有回车之类的特殊字符啊
    我刚才试了 语句没问题,你把整个语句写成一行看看怎么样
      

  2.   

    char的范围只有255,你给的太大了,换成blob类型的
    create table newest_product
    (Item_no char(20),
    Type char(20),
    Available_color char(50),
    Product_info1 blob,
    Service blob,
    Size char(20),
    Sheet char(20),
    Package char(20),
    Cover_material char(50),
    Cnt_size char(30),
    Gw char(20),
    Small_picture char(100),
    Middle_picture char(100),
    Larger_picture char(100),
    Corner_picture char(100),
    Edge_picture char(100),
    stocks int,Ttime datetime,
    Page_size char(20),
    Available char(20),
    Product_info2 blob,
    Product_info3 blob,
    Product_info4 blob,
    Product_info5 blob,
    Product_info6 blob);
      

  3.   

    我把Available_color char(50) 重写了一遍,还是没用,然后,按着上面的改了,也不行,
    You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'create table newest_product(Item_no char(20),Type char(20),Available_color char(' at line 2
    (耗费 0 ms)
    你们运行一下看行吗?
      

  4.   

    好了,解决了,居然不用写use anine,写了到错了