在写存储过程语句的过程中,什么时候用 go ,什么时候不用?(急!急!急!)
在写存储过程语句的过程中,什么时候用 go ,什么时候不用?
例如:
use pubs
go
if exists(select name from sysobjects where name='title_sum' and type='P')
drop proc titles_sum
go
use pubs
go
create proc title_sum @@title varchar(40) ='%',@@sum money output as select 'title name'=title from titles where title like @@title select @@sum=sum(price) from titles where title like @@title
go