Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3350908
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T01:50:39+00:00 2026-05-18T01:50:39+00:00

When creating a stored procedure, does the BEGIN/END block serve and purpose? eg, CREATE

  • 0

When creating a stored procedure, does the BEGIN/END block serve and purpose?

eg,

CREATE PROCEDURE SPNAME
AS
  SELECT * FROM TABLE

vs.

CREATE PROCEDURE SPNAME
AS
BEGIN
  SELECT * FROM TABLE
END
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T01:50:40+00:00Added an answer on May 18, 2026 at 1:50 am

    As indicated in the CREATE PROCEDURE documentation, the BEGIN/END is optional:

    { [ BEGIN ] sql_statement [;] [ …n ]
    [ END ] }

    One or more Transact-SQL
    statements comprising the body of the
    procedure. You can use the optional
    BEGIN and END keywords to enclose the
    statements. For information, see the
    Best Practices, General Remarks, and
    Limitations and Restrictions sections
    that follow.

    As a matter of personal preference, I always include them.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am creating a stored procedure which has to create a table which name
If you're creating a temporary table within a stored procedure and want to add
I'm creating a stored procedure to return search results where some of the parameters
I'm a newbie when it comes to SQL. When creating a stored procedure with
In a stored procedure, when is #Temptable created in SQL Server 2005? When creating
I have a stored procedure in SQL 2005. The Stored Procedure is actually creating
Trying to migrate from MSSQL to MySQL. This Stored Proc is creating a temp
I'm developing a C# SQL Server 2005 stored procedure that does data validation for
I have a GridView that is bound to a select statement from a table.
I am creating a simple stored procedure in VS 2010/SQL Server 2008 as follows:

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.