Hi all I am having a question regarding Sql Server(Len) and Mysql(Length)
I have written a sample script in Sql Server & Mysql as follows
Sql ---->select len('Experts ')
Result ---->7
MySql ---->select Length('Experts ')
Result ---->8
Now I just made a change in query as follows
Sql ---->select len(' Experts')
Result ---->8
MySql ---->select Length(' Experts')
Result ---->8
But why it is displaying different result in my first query..
The SQL Server
LENfunction excludes trailing spaces as indicated in the documentation: http://msdn.microsoft.com/en-us/library/ms190329.aspx.If you want the length with spaces included, try
LEN(<source> + 'x') - 1where<source>is whatever you’re trying to get the length of.