Monday, 17 December 2012

sql - Count No. of space in a string


select len('this is for test') - len(replace('this is for test', ' ', ''))

Result:
3

No comments:

Post a Comment