Auto generate sql @variable declarations


General question.

Are there any tools out there or the ability to write code in sql to auto generate the variables declarations.


SELECT * FROM MyTable WHERE MyField = @field

so the code would then generate something like this at the top of the sql window..

declare @field <enterType> = <value>;

Would speed up so much for me if I could do this.

sql prompt might. I can't recall

Thanks, I'll take a look at that, not heard of before. cheers