编写了一个这样的.sql文件
代码如下:
create database bbs;
use bbs;
create table article
(
id int primary key auto_increment,
pid int,
rootid int,
title varchar(255),
cont text,
pdate datetime,
isleaf int
);
--0代表leaf,1代表非leaf
insert into article values(null, 0, 1, '蚂蚁大战大象', '蚂蚁大战大象', now(), 1 );自己没发现什么错误啊,为什么会报错呢?

解决方案 »

  1.   


    -- 空格  注释。注意了。
    create   database   bbs;
    use   bbs;
    create   table   article
    (
    id   int   primary   key   auto_increment,
    pid   int,
    rootid   int,
    title   varchar(255),
    cont   text,
    pdate   datetime,
    isleaf   int
    );
    -- 0代表leaf,1代表非leaf
    insert   into   article   values(null,   0,   1,   '蚂蚁大战大象',   '蚂蚁大战大象',   now(),   1   );