我正在使用microsoft sql server管理,我收到一个名为“字符串或二进制数据将被截断”的错误。 在发布此问题之前,我已阅读有关此问题的类似帖子。许多人说这个领域不足以容纳数据。 但是,我声明我的“TrainerDesc”有一个varchar(3000),它比插入的数据大。那么为什么我仍然会收到此错误?
Create Table Trainer
(TrainerNo char(8) not null,
TrainerName varchar(50) not null,
TrainerDesc varchar(3000) null,
Primary Key (TrainerNo))
----------------------------------------------- -----插入值------------------------------------------- ---------
Insert into Trainer
values
('T5690146', 'Mary Hoe', 'Mary Hoe is a qualified and highly experienced Yoga trainer who holds a yoga instructor certificate obtained from the yoga center singapore in 2002. Furthermore, she taught yoga in various community clubs for more than a decade including Pek Kio CC, Choa Chu Kang cc and Yew Tee cc.Mary loves to spread her knowledge and skills with people who are keen to learn more about Yoga.')
答案 0 :(得分:0)
明确提及您的列,这是最佳做法
错误的最简单原因是您的表定义与您期望的列顺序不同,如果您之后添加了TrainerName或通过drop + add
更改了它,则会发生这种情况。hashValue