-
SQLServer Function - Get Byte Length ( Like Oracle LENGTHB )♣ Tech & Biz Salon/Tech 2012. 12. 28. 15:16
Oracle의 LENGTHB 같은게 없나 싶었는데 있네요.
아마도 예전에는 없다가 최근 버젼부터 나오는게 아닐까 생각도 듭니다.
The LEN (length) function returns the number of characters in a string expression, excluding any blanks after the last character (trailing blanks). DATALENGTH, on the other hand, returns the number of bytes used for an expression. In this recipe, I will demonstrate how to measure the number of characters and bytes in a string.
This first example returns the number of characters in the string:
SELECT LEN(N'She sells sea shells by the sea shore.')
This would return 38 This next example returns the number of bytes in the string.
SELECT DATALENGTH(N'She sells sea shells by the sea shore.')
This would return 76 '♣ Tech & Biz Salon > Tech' 카테고리의 다른 글
SqlServer SP with Output Parameter 실행 방법 (0) 2012.12.28 JDK 다운로드 ia64.exe? i586-p.exe? i586-p-iftw.exe? (0) 2012.12.20 JDK 1.4 64bit 호환 정보 (windows 2003, Itanium 2 processors) (0) 2012.12.18