Tuesday, 10 January 2017

SQL Server - string_split function

In SQL Server 2016, some new functions arrived. One of them will be “string_split“. It helps to split string without writing code.
Syntax –   string_split (<string>,<separator>)
Example –
SELECT * FROM STRING_SPLIT(‘NIHAR BHALCHANDRA KULKARNI’,’ ‘)
Output –
Value
————-
NIHAR
BHALCHANDRA
KULKARNI
This is how string split into separate characters and rows.

No comments:

Post a Comment