Skip to content
Advertisement

(SQL Server 2017) I get error Msg 8152 and I don’t know why

I have no idea why, but I am getting the error Msg 8152 (in SQL Server 2017) after trying to insert something like

into the table

The output I get is

Msg 8152, Level 16, State 14, Line 1
String or binary data would be truncated.

Thanks in advance for your help!

Advertisement

Answer

You need to define a length for your VARCHAR columns

For example

User contributions licensed under: CC BY-SA
3 People found this is helpful
Advertisement