• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 636
  • 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 ZiaConsultant Software Engineer - .NET ArchitectCommented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

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