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
- What are Virtual Log Files in SQL Server Transaction Log File?
- DROP IF EXISTS T-SQL Enhancement in SQL Server 2016
- How to Export records from SQL Server to Text File using BCP Command
- How to Drop Database in SQL Server by Closing Existing Connections
- Identify Deadlocks in SQL Server Using Trace Flag 1222 and 1204
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