Solved

How to create stored proc with extension PRC?

Posted on 2011-03-13
1
506 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

Optimize your web performance

What's in the eBook?
- Full list of reasons for poor performance
- Ultimate measures to speed things up
- Primary web monitoring types
- KPIs you should be monitoring in order to increase your ROI

Question has a verified solution.

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

These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
When table data gets too large to manage or queries take too long to execute the solution is often to buy bigger hardware or assign more CPUs and memory resources to the machine to solve the problem. However, the best, cheapest and most effective so…
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…

630 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