存储过程第一句
use pubs报错
Could not locate entry in sysdatabases for database 'pubs'. No entry found with that name. Make sure that the name is entered correctly.?????
use pubs报错
Could not locate entry in sysdatabases for database 'pubs'. No entry found with that name. Make sure that the name is entered correctly.?????
use pubs
if exists(select [name] from sysobjects where [name] = '#titles')
drop procedure #titles
gocreate procedure #titles @titles nchar(10),@name nchar(10)
as
insert into tb_test values (@titles,@name)
go
There is already an object named '#titles' in the database.
go--加一个gocreate proc t
as
select 1 as col
GO
.....
use [pubs]
go
if exists(select [name] from sysobjects where [name] = '#titles')
begin
drop procedure #titles
end
go create procedure #titles @titles nchar(10),@name nchar(10)
as
begin
insert into tb_test values (@titles,@name)
end
go
最近出现好几个类似的情况了,
都是begin end没有写的.