Aiden Bird
Aiden Bird

Reputation: 3

Which data type can be used for ISBNs - that only accepts 13 digits, including leading zeros

I am trying to add a ISBN column to a table that requires the input to only be 13 digits. the number may start with 0. I have tried char, and varchar, but that hasn't worked. I need to make it so that it doesn't accept anything less or more than 13 digits long (e.g. '0123456789112'). What can I use to do that?

What I have tried:

Upvotes: 0

Views: 572

Answers (0)

Related Questions