Wednesday, June 15, 2022

How to find view is present or exist in database or not in SQL Server

 if exists( SELECT name FROM esdm_nielit_new.sys.views WHERE name = 'VW_STUDENT_REGD_NEW')

DROP VIEW [dbo].[VW_STUDENT_REGD_NEW]

else 

begin

print 'view VW_STUDENT_REGD_NEW not found'

end

No comments:

Post a Comment