FORMATMESSAGE statement is enhanced in SQL Server 2016 to accept a msg_string argument. In the previous versions this function was used to form a message from text located in sys.messages
This is Part 9 of 10 Part T-SQL Enhancements in SQL Server 2016 for Developers and DBAs. Click here to read it from the beginning….
DECLARE @ExampleMessage VARCHAR(150) SET @ExampleMessage = FORMATMESSAGE ('SQL Server %s, has some amazing new features and learn them on %s!', '2016', 'MyTechMantra.com'); SELECT @ExampleMessage;
Trending SQL Server Articles and Tips
- DROP IF EXISTS SQL Server T-SQL Enhancement in SQL Server 2016
- How to Start SQL Server in Single User Mode?
- How to Change Select Top 1000 Rows and Edit Top 200 Rows Default Value in SQL Server Management Studio
- Configure Network Drive Visible for SQL Server During Backup and Restore Using SSMS
- Different Ways to Find Default Trace Location in SQL Server
Clicking Next Page button to continue reading the topics and click on the Previous Page button to revisit the previous topic.
- 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
- FORMATMESSAGE Statement