Home
Source: own resources, Authors: Agnieszka and Michał Komorowscy
Almost 4 years ago, I wrote a short post in Polish about problems that may occur if we forget about
GO keyword in our scripts. I decided to write this post again, this time in English, because recently I helped to fixed exactly the same problem again. As a remainder,
GO keyword instructs tools like SQL Management Studio, sqlcmd... to send the batch of T-SQL code to the server. Now, let's look at the following code that creates a stored procedure and tell me what is wrong here:
CREATE PROCEDURE dbo.pr_Fun
AS
BEGIN
/*...*/
RETURN
END
GRANT EXECUTE ON dbo.pr_Fun TO public
GO