22,207
社区成员
发帖
与我相关
我的任务
分享
declare @cut int
set @cut = (select count(*) as cut from sys.views where name = 'abc')
if @cut > 0
print 'c'
else
exec ('create view abc as select * from goods')
if exists(select * from sys.views where name='abc')
drop view abc;
go
create view as select * from goods;
go