With every new release some of the default behavior can surprise because you are so much used to them. But when they don’t behave the same, it baffles to when some of these changes were introduced. In pursuit of finding such behavior, while I was working with SQL Server 2016 Management Studio, I was surprised to see a behavior which didn’t seem to be right. You can also try it too.
Some puzzles come as legacy and a great way to do sometimes interviews. In the past, I have written some innovative solutions when it comes to splitting strings inside SQL Server. One of them is at: SQL SERVER – Split Comma Separated List Without Using a Function. Though this is a good solution, many have some back to say this is not a clean or a native way to work with strings. Let us learn about Splitting Strings puzzle.
MySQL supports some functions that can be used to extract the index position or the actual value from a set of values arranged as an array. ELT() and FIELD() are example of such functions. Let us understand about them in details.
Just received a question in an email asking questions about how to Convert String:
“I just got out of the interview and I was asked to write scripts to convert a string to Title Case. I was also asked to refer to the website over here to validate my answer after I complete writing script.
Do you think it is not fair to ask such questions in an interview?”