What SQL-server function can I use to get the character or byte length of a nvarchar(max) column?

Question :

What SQL-server function can I use to get the character or byte length of a nvarchar(max) column?,

Answer :

I have a column which is of type nvarchar(max). How do I find the length of the string (or the number of bytes) for the column for each row in the table?

,

SELECT LEN(columnName) AS MyLength
FROM myTable

That’s the answer What SQL-server function can I use to get the character or byte length of a nvarchar(max) column?, Hope this helps those looking for an answer. Then we suggest to do a search for the next question and find the answer only on our site.

Read More  Can a Linq query retrieve BLOBs from a Sql Database?

Disclaimer :

The answers provided above are only to be used to guide the learning process. The questions above are open-ended questions, meaning that many answers are not fixed as above. I hope this article can be useful, Thank you