Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What's the difference between CREATE PROC and CREATE PROCEDURE?

I've scoured msdn and haven't found an answer. Is there a difference I should know about?

If there is truly no difference then why would this redundancy exist?

--SQL Server Stored Procedure Syntax
CREATE { PROC | PROCEDURE } [schema_name.] procedure_name [ ; number ] 
    [ { @parameter [ type_schema_name. ] data_type }
        [ VARYING ] [ = default ] [ OUT | OUTPUT | [READONLY]
    ] [ ,...n ] 
[ WITH <procedure_option> [ ,...n ] ]
[ FOR REPLICATION ] 
AS { [ BEGIN ] sql_statement [;] [ ...n ] [ END ] }
[;]

Same with DROP PROC

DROP { PROC | PROCEDURE } { [ schema_name. ] procedure } [ ,...n ]
like image 619
LCIII Avatar asked Dec 12 '22 01:12

LCIII


1 Answers

There is no difference between the two.

Edit to answer your new question - there is no "redundancy" here, one is just short hand for the other. "Procedure" is a fairly long word, and people tend to like shortcuts for things. In the same way, "Exec" and "Execute" are the same.

like image 101
TZHX Avatar answered Dec 31 '22 21:12

TZHX