DECLARE @ObjectName sysname = 'VIEW_NAME’; DECLARE @ObjectSchema sysname = 'dbo’; DECLARE @WithFullscan BIT = 1; DECLARE @ExecuteUpdateStatistics BIT = 1; —————CODE SET NOCOUNT ON; IF NOT EXISTS ( SELECT * FROM sys.objects WHERE name = @ObjectName AND schema_id = SCHEMA_ID(@ObjectSchema) AND type = 'V’ ) THROW 50000, 'Obiekt nie istniejeCzytaj dalej / Read more