문제

I'm having a problem with sql.

When I try updating like this:

UPDATE Event SET name = 'bla bla bla' WHERE id = 2

It gives me this error:

String or binary data would be truncated. The statement has been terminated.

However, when I try updating with one space less, like this:

UPDATE Event SET name = 'bla bla' WHERE id = 2

It works fine. How come? Any inputs on how to go around this error would be appreciated.

도움이 되었습니까?

해결책

This has nothing to do with the space. The longer string is too long for name.

Look at the definition of name. You'll see that 'bla bla bla' is too long for it. But 'bla bla' fits.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top