I am trying to create a script that creates and populates tables, and then create the stored procedures for my app to access them. My script runs just fine until I get to the stored procedures. I'm trying to read a .sql file into my app and then run this script through my connection in one execution. Is there any way I can remove the 'go' keyword from this chunk of the script to make it run in one execution?
if object_id('GetStudentByID') is not null
drop procedure GetStudentByID;
go
create procedure GetStudentByID
(@StudentID INT)
as
select StudentID,FirstName,LastName
from Student
where StudentID = @StudentID;