我的阿荣 发表于 2009-5-10 01:50:33

求救各位高手

本人变了一个表 可是在插入数据时却出现了如下错误 :消息 8152,级别 16,状态 14,第 1 行
将截断字符串或二进制数据。
语句已终止。
   

编写表如下:
      create database Factory
use factory
CREATE TABLE S
(
sno char(4)not null primary key ,
sname varchar(8) not null,
sage smallint,
swage char(6),
sdepartments char(2),
sphone char(10),
soffice char(6)

);


insert into s(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('1001','郑俊华',26,'1000',1,'8001234','1201#');
insert into s(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('1002','王平',27,'1200',1,'8001234','1201#');
insert into s(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('2001','王晓华',38,'1300',2,'8001235','2302#');
insert into s(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('2002','李力',24,'800',2,'8001236','2303#');
insert into s(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('3001','黎远军',42,'1300',3,'8001237','1202#');
insert into s(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('4001','李源',24,'800',4,'8001245','2402#');
insert into s(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('4002','李兴明',36,'1200',4,'8001246','2103#');

nj19900821 发表于 2009-11-18 17:43:33

“将截断字符串或二进制数据” 这个代表你所插入的元组某个值超过了你之前建表时定义的属性长度

zzw9908 发表于 2009-12-24 10:48:07

insert into S(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('1001','郑俊华',26,'1000','1','8001234','1201#')
insert into S(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('1002','王平',27,'1200','1','8001234','1201#')
insert into S(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('2001','王晓华',38,'1300','2','8001235','2302#')
insert into S(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('2002','李力',24,'800','2','8001236','2303#')
insert into S(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('3001','黎远军',42,'1300','3','8001237','1202#')
insert into S(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('4001','李源',24,'800','4','8001245','2402#')
insert into S(sno,sname,sage,swage,sdepartments,sphone,soffice)
values('4002','李兴明',36,'1200','4','8001246','2103#')
页: [1]
查看完整版本: 求救各位高手

免责声明:
本站所发布的一切破解补丁、注册机和注册信息及软件的解密分析文章仅限用于学习和研究目的;不得将上述内容用于商业或者非法用途,否则,一切后果请用户自负。本站信息来自网络,版权争议与本站无关。您必须在下载后的24个小时之内,从您的电脑中彻底删除上述内容。如果您喜欢该程序,请支持正版软件,购买注册,得到更好的正版服务。如有侵权请邮件与我们联系处理。

Mail To:Admin@SybaseBbs.com