Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

Databases

SQL Error: datatype mismatch

I am trying to insert item into products table but it return SQL Error: datatype mismatch I wondering what is the meaning of this one? Is it the data type i put in the (<value>) is wrong or what?

2 Answers

Steven Parker
Steven Parker
231,248 Points

:point_right: Your insert may not match the table definition.

A datatype mismatch can mean that you're trying to insert something into a column that is a different type than what that column was declared to contain in the table definition.

If it's not clear what's different, you could share both your insert statement and the table definition here for a more detailed analysis.

Thanks for the explanation. You are correct which mismatch is simply saying that the data type input was different than the column expected. I just found out how to do it through your explanation, thx =D