Solved

How to create stored proc with extension PRC?

Posted on 2011-03-13
1
499 Views
Last Modified: 2012-05-11
Hi

How to create stored proc with extension PRO.Is it
CREATE PROCEDURE [dbo].[StoredProcName.PRO]
or
CREATE PROCEDURE [dbo].[StoredProcName].[PRO]

and also could any one explain significance of sqaure brackets"[ ]" in naming.

Thank You
0
Comment
Question by:mkarthik415
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 6

Accepted Solution

by:
AkAlan earned 500 total points
ID: 35122605
CREATE PROCEDURE [dbo].[spYourSP.PRO]

AS SELECT     *
FROM         YourTable

The square brackets are placed there to seperate out which part is the Owner, unless you have a good reason to have seperate owners such as multiple people creating storedprocedures against the same database, I would alway leave it at dbo which is the database owner. It also allows you to create a sp with periods in it. If you didn't want the period in the name and you wanted the owner to be dbo you could do something like this using an underscore which is what I would suggest. For that matter I would probably put the PRO in front if you will be using multiple sp's with that naming convention, that way they would show alphabetically when you look for them. What is the significance of the PRO?

CREATE PROCEDURE spYourSP_PRO

AS SELECT     *
FROM         YourTable
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Creating and Managing Databases with phpMyAdmin in cPanel.
Many companies are looking to get out of the datacenter business and to services like Microsoft Azure to provide Infrastructure as a Service (IaaS) solutions for legacy client server workloads, rather than continuing to make capital investments in h…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question