Solved

How to create stored proc with extension PRC?

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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

I annotated my article on ransomware somewhat extensively, but I keep adding new references and wanted to put a link to the reference library.  Despite all the reference tools I have on hand, it was not easy to find a way to do this easily. I finall…
In this article we will get to know that how can we recover deleted data if it happens accidently. We really can recover deleted rows if we know the time when data is deleted by using the transaction log.
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…

809 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