RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Tip of the Day
Language: SQL Server 6.5 and Up
Expertise: Beginner
Oct 3, 2003



Building the Right Environment to Support AI, Machine Learning and Deep Learning

A Simple Way to Debug a Stored Procedure

Debugging stored procedures can be a headache, but heres an easier way to trace a stored procedure's execution: Use the PRINT statement. PRINT lets you output and analyze variable values, which is sometimes good enough. Note a few restrictions when using PRINT:

  1. You can use only Char or VarChar data types. You must convert other data types to Char or VarChar in order to "print" them out.
  2. The printed string can be up to 8,000 characters long; any characters after 8,000 are truncated. (SQL Server 6.5 up to 255 characters long.)
  3. SQL Sever 6.5 doesn't allow inline concatenation of variables. SQL Server 7.0 and 2000 don't have this limitation.
Alex Grinberg
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date