Syntax for Writing Stored Procedure with Parameters

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • oladipupo
    New Member
    • Feb 2007
    • 2

    #1

    Syntax for Writing Stored Procedure with Parameters

    What is the syntax to write Stored Procedure in SQL requiring parameter values from user?
  • ck9663
    Recognized Expert Specialist
    • Jun 2007
    • 2878

    #2
    Originally posted by oladipupo
    What is the syntax to write Stored Procedure in SQL requiring parameter values from user?

    http://msdn2.microsoft .com/en-us/library/ms187926.aspx

    Comment

    • shaileshb
      New Member
      • Jun 2007
      • 27

      #3
      1) Creating a Stored Procedure

      Create Procedure <Procedure Name>
      (<Parameter1> DataType, <Parameter1> Datatype......)
      As
      Begin

      --your t-sql statements
      End
      --------------------------------------------------------------------------------------

      2) Executing the stored procedure

      Exec <Procedure Name> Parameter1, parameter1,.... ...

      Comment

      Working...