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
Tell me when is the update_statistics command used?
what is the system function to get current user's user id? : Sql server database administration
In which files does sql server actually store data?
Explain logical operators in sql server?
What are subquery and its properties?
What is difference between delete & truncate commands?
What are the functions in sql server?
How to enter comments in transact-sql statements?
What does asynchronous call backs means?
What is a coalesce function?
How to create new tables with "select ... Into" statements in ms sql server?
You have modified 100 store procedures and want to replicate these changes from development to prodution, and production can have users using the Server/DB, how would you replicate without causing issues?
How do you send email on SQL Server?
How to choose all records from the table?
Can you please explain the difference between function and stored procedure?