34,588
社区成员
发帖
与我相关
我的任务
分享
if exists(select 1 from sys.databases where [name] =N'master')
begin
--做你数据库的操作
--这中间不能使用GO
--必须在end后才能使用
end
GO
if exists(select 1 from sys.databases where [name] =N'master')
begin
--做你数据库的操作
--这中间不能使用GO
--必须在end后才能使用
end
GO --加在这里,
--语句多的话,拆开成多个写就行了,
--否则就跳过,
if exists(select 1 from sys.databases where [name] =N'master')
begin
--做你数据库的操作
--这中间不能使用GO
--必须在end后才能使用
end
GO --加在这里,
。。。。