• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 617
  • Last Modified:

When a field is declare with narchar(max), is this a wast or sapce?

Should I specify a possible range that I know would satisfy for sure with like 100 char.  For instance, someone declare using max for a email field.  Does this waste the space or does it just make it flexible length?  Thanks.
0
lapucca
Asked:
lapucca
3 Solutions
 
hongjunCommented:
It is flexible length but then the field cannot be indexed.
0
 
Anthony PerkinsCommented:
In general it is considered poor practice not to define explicit sizes.  You should also ask yourself if your really need to support unicode data types.
0
 
Imran Javed ZiaCommented:
It will not waste the space as per varchar space allocation concept definition
0
 
lapuccaAuthor Commented:
Good point, I don't know when I need unicode.  I just always use that .  I'll have to look that up.  You all got great input.  thank you.
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now