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’,’ ‘)
SELECT * FROM STRING_SPLIT(‘NIHAR BHALCHANDRA KULKARNI’,’ ‘)
Output –
Value
————-
NIHAR
BHALCHANDRA
KULKARNI
Value
————-
NIHAR
BHALCHANDRA
KULKARNI
This is how string split into separate characters and rows.
Comments
Post a Comment