Search

Showing posts with label SQL TIPS. Show all posts
Showing posts with label SQL TIPS. Show all posts

Thursday, 17 February 2011

SQL – Simple way to return messages at runtime instead of using PRINT

Care of David Poole of SQLServerCentral: http://www.sqlservercentral.com/articles/Documentation/72473/

 

 

RAISERROR ( 'DATA DICTIONARY: %i tables & %i fields added', 10, 1,

    @TableCount, @FieldCount ) WITH NOWAIT




The "10" parameter is the SEVERITY of the error message raised.

10 : this is more of a notice message, or minor alert

16 : this is reserved for true error messages


You can find more via:
http://www.sqlservercentral.com/articles/SQL+Puzzles/quickhintsforusingtheraiserrorcommand/2114/

http://msdn.microsoft.com/en-us/library/ms178592.aspx

Tuesday, 12 October 2010

[SQL] Calculating space used by Tables etc.

If you're looking for a fast easy way to find out the space used by tables, take a look at the excellent article by David Poole:

SQL Server Central link


The man is a genius - I'm privileged to have worked with him.