What is TRY_CONVERT Function in SQL Server?


TRY_CONVERT Function was introduced with SQL Server 2012. This function is similar to previous CONVERT Function but this Function will return null if the value provided is not convertible.
Syntax: TRY_CONVERT(datatype,Value)
Example:

Select TRY_CONVERT(int,'100')


Result:
100

Select TRY_CONVERT(int,'Hitesh')


Result:
(null)