What is the maximum field length sql will sort? for varchar or nvarchar
Hey guys I thought I ran into something w开发者_C百科here sql would only sort up to a certain length of a varchar or nvarchar. Does anyone know that #?
However, there is a limit of 8,060 bytes for the row size of intermediate worktables needed for sort operations. This limits the total size of columns specified in an ORDER BY clause.
Ref.
If you are hitting that length, you have bigger problems!
This is implementation dependent
- Fast searching of large (n)varchar values
- Hashing large data strings with a User Defined Function
you can order by some (hashing, checksum, whatever) function (which reduces the size to sortable one) from column values being ordered
精彩评论