• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Chapter 8. Designing SQL Server Stored P... > Declaring and Working with Variables

Declaring and Working with Variables

Just as you can create variables within the subroutines and functions that you build, you can declare variables in your stored procedures. You use the keyword DECLARE to create a variable. The syntax looks like this:

DECLARE @VariableName DataType [(length)], @VariableName DataType [(length)]


					  


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint