Today marks the end of my not-so brief sabbatical from my blog; thanks to everyone who stuck along. I can promise some free templates not to mention some nice EE themes within the coming weeks.

Anyway, yesterday I was working on a stored procedure that required me to select a field from the table into a variable. I figured it had something to do with the SET keyword, but it took me a while to figure out the exact syntax:

DECLARE @VariableName INT

SET @VariableName = (SELECT COUNT(*) FROM Customers WHERE State = 'MN')