When executing IF/THEN queries in SQL Server I am using a Print Statement to let the user/myself know what has happened.
Also when I run a query SQL Server mentions how many rows have been affected.
After searching I have only come across MySQL functions that allow PRINT statements to be exported via SELECT into OUTFILE. Does SQL Server have a way to send the PRINT statements and or messages to a .txt file for logging?