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 Basics Finding the Data You Want Searching Tables with 'WHERE'

Question on Integer data type

Can integer data types work for numbers when there is a 0 prefix? For instance, a five digit zip code such as 07210. A social security number and bank account# are other examples.

For instance, we don't want a 07210 zip code to display as 7210. Or a customer with bank account # 00012345 may not be the same as one with 0012345 or 12345

1 Answer

Steven Parker
Steven Parker
231,236 Points

Even though they are composed entirely of digits, since no math is ever done on them it can be better to store data like zip codes and account numbers as strings.