Reputation: 14926
I have 100000 Ids to store into our DataBase. Id is in string format.each id contain 10 char. So what is the best data type is for this data?
I have been used vrchar(max), text but my problem is not solved.
So please experts help me.
Upvotes: 2
Views: 512
Reputation: 432180
varchar(10) assuming you have one ID per row and upto 10 characters
All 100000 in one varchar(max) is simply wrong... or have I misunderstood your intention?
Upvotes: 0
Reputation: 22895
why not just varchar(10), if that is the max. length? that way you avoid any off-row storage. Although you'll need a good reason to store a numeric valued column in a non-numeric column...
Upvotes: 3