Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Database & SysAdmin
  3. Database
  4. How to create stored procedure in SQL Server 2005

How to create stored procedure in SQL Server 2005

Scheduled Pinned Locked Moved Database
databasesql-serversysadminhelptutorial
9 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    compad
    wrote on last edited by
    #1

    Hello Friends, How to create stored procedure in SQL Server 2005. Please help me. Thanks in advance. Adarsh

    C N N 3 Replies Last reply
    0
    • C compad

      Hello Friends, How to create stored procedure in SQL Server 2005. Please help me. Thanks in advance. Adarsh

      C Offline
      C Offline
      Colin Angus Mackay
      wrote on last edited by
      #2

      CREATE PROCEDURE mySchema.MyProcedure
      (
      ... Parameters go here ...
      )
      AS
      ... SQL Code Goes here ...
      GO

      Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog

      C 1 Reply Last reply
      0
      • C compad

        Hello Friends, How to create stored procedure in SQL Server 2005. Please help me. Thanks in advance. Adarsh

        N Offline
        N Offline
        nelsonpaixao
        wrote on last edited by
        #3

        hi, you have to download some tutorial first ;P

        nelsonpaixao@yahoo.com.br

        C 1 Reply Last reply
        0
        • C compad

          Hello Friends, How to create stored procedure in SQL Server 2005. Please help me. Thanks in advance. Adarsh

          N Offline
          N Offline
          new2pgrmg
          wrote on last edited by
          #4

          Hi Adarsh, Open SQL Server Create a database like "Test" Open that database You will find programability--open it you will find stored prtocedure. Rite click ....select new stored procedure A query window will come paste ur SP and run It will get added to your SP For further questions mai me at jijuanair@gmail.com Hope this helps

          1 Reply Last reply
          0
          • C Colin Angus Mackay

            CREATE PROCEDURE mySchema.MyProcedure
            (
            ... Parameters go here ...
            )
            AS
            ... SQL Code Goes here ...
            GO

            Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog

            C Offline
            C Offline
            compad
            wrote on last edited by
            #5

            Thanks for your reply. can u have anything more. something like data types, how to declare variable, how to check condition. I am aware of Oracle Procedure. Is the same syntax or something different. Please Help me Adarsh

            C 1 Reply Last reply
            0
            • N nelsonpaixao

              hi, you have to download some tutorial first ;P

              nelsonpaixao@yahoo.com.br

              C Offline
              C Offline
              compad
              wrote on last edited by
              #6

              Thanks for your help If you have any link for tutorial. please forward it to me. Thanks Adarsh

              C 1 Reply Last reply
              0
              • C compad

                Thanks for your help If you have any link for tutorial. please forward it to me. Thanks Adarsh

                C Offline
                C Offline
                Colin Angus Mackay
                wrote on last edited by
                #7

                compad wrote:

                If you have any link for tutorial. please forward it to me.

                Can you not use a search engine? The search term "SQL Server Tutorial" will probably give you lots of links to helpful websites.

                Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog

                1 Reply Last reply
                0
                • C compad

                  Thanks for your reply. can u have anything more. something like data types, how to declare variable, how to check condition. I am aware of Oracle Procedure. Is the same syntax or something different. Please Help me Adarsh

                  C Offline
                  C Offline
                  Colin Angus Mackay
                  wrote on last edited by
                  #8

                  compad wrote:

                  how to declare variable

                  DECLARE @myVariable int -- or what ever type you want.

                  compad wrote:

                  how to check condition

                  IF @myVariable = 123
                  BEGIN
                  ... Some SQL Code Here
                  END
                  ELSE
                  BEGIN
                  ... Some other SQL Code here
                  END

                  compad wrote:

                  I am aware of Oracle Procedure. Is the same syntax or something different.

                  You might want to read the documentation.

                  Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog

                  C 1 Reply Last reply
                  0
                  • C Colin Angus Mackay

                    compad wrote:

                    how to declare variable

                    DECLARE @myVariable int -- or what ever type you want.

                    compad wrote:

                    how to check condition

                    IF @myVariable = 123
                    BEGIN
                    ... Some SQL Code Here
                    END
                    ELSE
                    BEGIN
                    ... Some other SQL Code here
                    END

                    compad wrote:

                    I am aware of Oracle Procedure. Is the same syntax or something different.

                    You might want to read the documentation.

                    Recent blog posts: *SQL Server / Visual Studio install order *Installing SQL Server 2005 on Vista *Tip of the Day - SysInternals * Meme My Blog

                    C Offline
                    C Offline
                    compad
                    wrote on last edited by
                    #9

                    Thanks a lot I got it. Adarsh

                    1 Reply Last reply
                    0
                    Reply
                    • Reply as topic
                    Log in to reply
                    • Oldest to Newest
                    • Newest to Oldest
                    • Most Votes


                    • Login

                    • Don't have an account? Register

                    • Login or register to search.
                    • First post
                      Last post
                    0
                    • Categories
                    • Recent
                    • Tags
                    • Popular
                    • World
                    • Users
                    • Groups