SQL Server 2016 introduces two new string functions namely STRING_SPLIT and STRING_ESCAPE.
This is Part 8 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the beginning….
STRING_SPLIT: This string function can be used to split the character expression using the specified separator.
For more information, see STRING_SPLIT (Transact-SQL).
Syntax: STRING_SPLIT (string , separator)
Example: SELECT STRING_SPLIT('MyTechMantra Helps DBAs and Developers Daily', ' ');
Output
MyTechMantra
Helps
DBAs
and
Developers
Daily
Trending SQL Server Articles and Tips
- How to Automate Backup of Analysis Services Database Using SQL Server Agent Job
- How to Configure TempDB on Local Disk in SQL Server 2012/2014 Failover Cluster to Improve Performance
- Identify Deadlocks Using Graphical Deadlock Chain Event in SQL Server Profiler
- Display Line Numbers in SQL Server Management Studio (SSMS)
- SQL Server SELECT DISTINCT Clause T-SQL Tutorial with Examples
STRING_ESCAPE: This function can escape special characters within texts and will return text with escaped characters. For more information, see STRING_ESCAPE (Transact-SQL).
Syntax: STRING_ESCAPE(text , type)
Clicking Next Page button to continue reading the topics and click on the Previous Page button to revisit the previous topic.
Related Topics
- FORMATMESSAGE Statement
- SERVERPROPERTY Function
- TRUNCATE TABLE WITH PARTITIONS
- DROP IF EXISTS
- ALTER TABLE WITH (ONLINE = ON | OFF)
- MAXDOP for DBCC CHECKDB, DBCC CHECKTABLE and DBCC CHECKFILEGROUP
- ALTER DATABASE SET AUTOGROW_SINGLE_FILE
- ALTER DATABASE SET AUTOGROW_ALL_FILES
- COMPRESS and DECOMPRESS Functions
- STRING_SPLIT and STRING_ESCAPE Functions