| 网站首页 | 业界新闻 | 小组 | 威客 | 人才 | 下载频道 | 博客 | 代码贴 | 在线编程 | 编程论坛
欢迎加入我们,一同切磋技术
用户名:   
 
密 码:  
共有 1534 人关注过本帖
标题:请教下面的SQL语句有什么错误
只看楼主 加入收藏
江湖SHARK
Rank: 1
等 级:新手上路
帖 子:5
专家分:0
注 册:2007-3-18
收藏
 问题点数:0 回复次数:0 
请教下面的SQL语句有什么错误
下面是段java关于数据库的操作 所用数据库是mysql
请高手帮忙看哈有什么错误的?
stmt.executeUpdate("create table bookinfo(id INT not null primary
            key,title VARCHAR(50) not null,author VARCHAR(50) not null,bookconcern VARCHAR(100) not
            null,publish_date DATE not null,price FLOAT(4,2) not null,amout SMALLINT,remark
            VARCHAR(200))ENGINE = InnoDB");
下面是编译的错误
CreateDBServlet.java:39: 未结束的字符串字面值
                        stmt.executeUpdate("create table bookinfo(id INT not nul
l primary
                                           ^
CreateDBServlet.java:40: 不是语句
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                        ^
CreateDBServlet.java:40: 需要 ';'
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                           ^
CreateDBServlet.java:40: 需要 ';'
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                                         ^
CreateDBServlet.java:40: 不是语句
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                                              ^
CreateDBServlet.java:40: 需要 ';'
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                                                 ^
CreateDBServlet.java:40: 需要 ';'
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                                                                     ^
CreateDBServlet.java:40: 不是语句
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                                                                          ^
CreateDBServlet.java:40: 需要 ';'
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not
                                                                             ^
CreateDBServlet.java:40: 需要 ';'
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not

                      ^
CreateDBServlet.java:40: 不是语句
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not

                            ^
CreateDBServlet.java:40: 需要 ';'
                        key,title VARCHAR(50) not null,author VARCHAR(50) not nu
ll,bookconcern VARCHAR(100) not

                               ^
CreateDBServlet.java:41: 需要 ';'
                        null,publish_date DATE not null,price FLOAT(4,2) not nul
l,amout SMALLINT,remark
                                              ^
CreateDBServlet.java:41: 不是语句
                        null,publish_date DATE not null,price FLOAT(4,2) not nul
l,amout SMALLINT,remark
                                               ^
CreateDBServlet.java:41: 需要 ';'
                        null,publish_date DATE not null,price FLOAT(4,2) not nul
l,amout SMALLINT,remark
                                                  ^
CreateDBServlet.java:41: 需要 ';'
                        null,publish_date DATE not null,price FLOAT(4,2) not nul
l,amout SMALLINT,remark
                                                                   ^
CreateDBServlet.java:41: 不是语句
                        null,publish_date DATE not null,price FLOAT(4,2) not nul
l,amout SMALLINT,remark
                                                                         ^
CreateDBServlet.java:41: 需要 ';'
                        null,publish_date DATE not null,price FLOAT(4,2) not nul
l,amout SMALLINT,remark
                                                                            ^
CreateDBServlet.java:41: 需要 ';'
                        null,publish_date DATE not null,price FLOAT(4,2) not nul
l,amout SMALLINT,remark

                       ^
CreateDBServlet.java:42: 需要 ';'
                        VARCHAR(200))ENGINE = InnoDB");
                                    ^
CreateDBServlet.java:42: 未结束的字符串字面值
                        VARCHAR(200))ENGINE = InnoDB");
                                                    ^
21 错误
搜索更多相关主题的帖子: SQL 语句 数据库 null not 
2008-03-29 15:13
快速回复:请教下面的SQL语句有什么错误
数据加载中...
 
   



关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.031529 second(s), 7 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved