I have a field that allows up to 40,000 NVARCHAR (40000)
bytes to be inserted into.
I now want to determine the number of bytes which users are actually inserting into the field so I can get the max, average, etc.
What query would I use to do that?
CodePudding user response:
Let's suppose the name of your table is target
and the name of your field is data
.
The following query will do this for you:
select length(data) from target;