---
title: "Error while insert value in table."  
description: "Error while insert value in table."  
author: "Anonymous User"  
published: 2012-12-15  
updated: 2013-04-09  
canonical: https://www.mindstick.com/forum/501/error-while-insert-value-in-table  
category: "mssql server"  
tags: ["mssql server"]  
reading_time: 1 minute  

---

# Error while insert value in table.

when i [insert](https://www.mindstick.com/blog/173/executing-insert-delete-or-update-query-in-sqlserver-using-ado-dot-net) any value in table when a error generated my table:[create table](https://www.mindstick.com/articles/443/how-to-create-table-in-sql-server) [customer](https://www.mindstick.com/articles/325839/how-to-improve-your-business-level-of-customer-service)( id int [primary key](https://www.mindstick.com/blog/214/primary-key), f_name [varchar](https://www.mindstick.com/forum/161878/what-is-the-difference-between-nvarchar-and-varchar), l_name varchar, age int)\
insert Query:insert into customer [values](https://www.mindstick.com/forum/327/sum-textbox-values)(1,'John','Rob',22)\
Error:\
Msg 8152, Level 16, State 14, Line 1[String](https://www.mindstick.com/articles/1527/string-split-in-c-sharp) or [binary data](https://www.mindstick.com/blog/302219/explore-the-science-binary-data-here) would be truncated.The statement has been terminated. help me anybody.\
\
\

## Replies

### Reply by Shankar M

Hi John,\
The Error Message says that the values that you are trying to insert to the column specified has exceeded the column length. Alter your table structure and try working it.\
Thanks,Shankar

### Reply by Vijay Shukla

You can just alter your table with this below code:\
create table customer( id int [primary](https://www.mindstick.com/forum/33739/difference-between-primary-key-and-unique-key) key, f_name varchar(50), l_name varchar(50), age int)


---

Original Source: https://www.mindstick.com/forum/501/error-while-insert-value-in-table

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
