SQL Server: See your print statements as they happen using raiserror

When writing long running SQL scripts the fact that a PRINT SQL statement is not immediately output to the Messages window can cause frustration and I can never remember the syntax for RAISERROR, so here it is:
RAISERROR('Hello there', 0, 255) WITH NOWAIT
See MSDN RAISERROR

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s