Jun 2026 Discount: Comprehensive Database Performance Health Check | Testimonials

Home
  • Consulting
  • Training
  • Free Videos
  • All Articles
    • Interview Questions and Answers
    • SQL Tips and Tricks
    • SQL Performance
    • SQL Puzzle
    • Big Data
    • Blog Stats
    • SQL Books
  • Hire Me
  • Health Check

SQL SERVER – Find Length of Text Field

June 20, 2007
Pinal Dave
SQL, SQL Server, SQL Tips and Tricks
SQL Function, SQL Scripts
To measure the length of VARCHAR fields the function LEN(varcharfield) is useful. To measure the length of TEXT fields the function is DATALENGTH(textfield). Len will not work for text field. Example: SELECT DATALENGTH(yourtextfield) AS TEXTFieldSize Reference : Pinal Dave (https://blog.sqlauthority.com)
Read More
  • SQL Interview Q & A
  • Testimonials
  • Search
  • Privacy Policy

© 2006 – 2026 All rights reserved. pinal @ SQLAuthority.com

Go to mobile version