Function vs Stored Procedure in SQL

What is the different between Stored Procedure and Function?. This is the important question which asked in interview most of the time. We are going to share top 10 differences of Stored Procedure and Function.

Reverse a string without using REVERSE() function in SQL

Functions are created for to do a specific task in any language. eg: REVERSE() function (as its name suggests) reverses a string’s value. Every function have some logic behind that. Sometimes interviewer asked this question "Reverse a string without using REVERSE() function in sql or other language?". Find below code for String reverse without using T-SQL function.