What are the difference between data length and length in
SQL Server-2008?
Answer Posted / bindu
The DATALENGTH function counts both trailing spaces and preceeding spaces when calculating the length of the expression.
The DATALENGTH function will return NULL, if the expression is NULL.
The LEN function does NOT count trailing spaces at the end of the string when calculating the length of the string.
The LEN function does count spaces at the start of the string when calculating the length of the string.
The LEN function will return NULL, if the string is NULL.
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is difference between join and natural join?
What is the purpose of the tempdb database?
explain how to create a new schema in a database? : Sql server database administration
What is the contrast between sql and pl/sql?
Delete duplicate rows without using rowid.
How to create dbo table in sql server?
Introduction of rollup clause using sum and group by clause?
Tell me what is de-normalization and what are some of the examples of it?
Why is there a performance difference between two similar queries where one uses union and the other uses union all?
What are the characteristics of modern DBMS?
What is query cost in sql server?
What are the differences between sql server and mysql.
How to perform backup for certificates in sql server? : sql server security
How retrieve field names from the table in SQL through JAVA code?
Explain how to send email from sql database?