get sql string code example
Example 1: sql server substring
SELECT SUBSTRING('SQL Tutorial', 1, 3) AS ExtractString;
Example 2: locate sql server
SELECT CHARINDEX('b','ab') //returns 2
SELECT SUBSTRING('SQL Tutorial', 1, 3) AS ExtractString;
SELECT CHARINDEX('b','ab') //returns 2