Friday, June 26, 2009

SUBSTRING() in SQL Server

SELECT 'gangadhar',SUBSTRING('gangadhar', 1, 1)

this query returns the name in one column with only the first initial in the second column.

Output is:
gangadhar g

No comments: