插入出错

小曦子 2008-12-09 02:12:09
create database jhonny default character set gb2312;
grant all privileges on jhonny.* to jhonny@localhost IDENTIFIED BY 'jhonny_74513210' WITH GRANT OPTION;
use jhonny;
create table user(
userID int unsigned auto_increment,
userName char(10) not null,
userType int unsigned default 0,
password char(20) not null,
phone char(30),
qq char(20),
addr char(50),
primary key(userID)
);
insert into user(userName,userType,password) values('ytfsse','1','74513210');
insert into user(userName,userType,password) values('ytfsse1','1','74513210');
insert into user(userName,userType,password) values('ytfsse2','1','74513210');
insert into user(userName,userType,password) values('ytfsse3','1','74513210');

create table matter(
userName char(10) not null,
note varchar(1000) not null,
noteDate datetime,
primary key(userName)

);

create view matterView as select
matter.*
from matter;

insert into matter(userName,note,) values('ytfsse','564646464634');
insert into matter(userName,note,) values('ytfsse1','564646464634');
insert into matter(userName,note,) values('ytfsse2','564646464634');
insert into matter(userName,note,) values('ytfsse3','564646464634');

为什么最后那四行插入会出错呀???
...全文
76 11 打赏 收藏 转发到动态 举报
写回复
用AI写文章
11 条回复
切换为时间正序
请发表友善的回复…
发表回复
小曦子 2008-12-09
  • 打赏
  • 举报
回复
看来是多了个逗号呀
Wayne 2008-12-09
  • 打赏
  • 举报
回复
下次少加个逗号
yumi_yu 2008-12-09
  • 打赏
  • 举报
回复
lz是否都是用复制黏贴的呢~~~
ReyZhang 2008-12-09
  • 打赏
  • 举报
回复
jf
ttg520 2008-12-09
  • 打赏
  • 举报
回复
jf
qinhl99 2008-12-09
  • 打赏
  • 举报
回复
哈哈,接分!
xupeihuagudulei 2008-12-09
  • 打赏
  • 举报
回复
[Quote=引用 4 楼 jiang_jiajia10 的回复:]
insert into matter(userName,note,) values('ytfsse1','564646464634');
insert into matter(userName,note,) values('ytfsse2','564646464634');
insert into matter(userName,note,) values('ytfsse3','564646464634');
粗心的LZ.
[/Quote]
jiang_jiajia10 2008-12-09
  • 打赏
  • 举报
回复
insert into matter(userName,note,) values('ytfsse1','564646464634');
insert into matter(userName,note,) values('ytfsse2','564646464634');
insert into matter(userName,note,) values('ytfsse3','564646464634');
粗心的LZ.
skeljy 2008-12-09
  • 打赏
  • 举报
回复
lz 粗心类!
楼外楼 2008-12-09
  • 打赏
  • 举报
回复
insert into matter(userName,note) values('ytfsse3','564646464634');
多了个逗号
cuike519 2008-12-09
  • 打赏
  • 举报
回复
==>insert into matter(userName,note,) values('ytfsse','564646464634');

insert into matter(userName,note) values('ytfsse','564646464634');
多个逗号。。。

62,046

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术交流专区
javascript云原生 企业社区
社区管理员
  • ASP.NET
  • .Net开发者社区
  • R小R
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

.NET 社区是一个围绕开源 .NET 的开放、热情、创新、包容的技术社区。社区致力于为广大 .NET 爱好者提供一个良好的知识共享、协同互助的 .NET 技术交流环境。我们尊重不同意见,支持健康理性的辩论和互动,反对歧视和攻击。

希望和大家一起共同营造一个活跃、友好的社区氛围。

试试用AI创作助手写篇文章吧