alter

Invalid object name [dbo].[TriggerName]

隐身守侯 提交于 2021-02-11 15:00:42
问题 I created a trigger named UPDATE_MERCHANDISE . The query completed with one error, a simple typo. I fixed the typo and changed the code to ALTER TRIGGER , but now when I try to execute it I receive the error Invalid object name [dbo].[UPDATE_MERCHANDISE] Why would it be valid when I created it, but not when I try to alter it? Any and all help/ideas would be appreciated. Thanks. USE [CIS31038] GO SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO ALTER TRIGGER [dbo].[UPDATE_MERCHANDISE] ON [dbo]

Adding a new column to an existing table in production

时光怂恿深爱的人放手 提交于 2021-01-28 12:31:58
问题 What is the best approach to add a not null column with default value in production oracle database when that table contain one million records and it is live. Does it create any locks if we do the column creation , adding default value and making it as not null in a single statement? 回答1: Depends on the version. Starting from 11g, you can execute a simple ALTER TABLE command and there will be no impact, the default value is not materialized and taken from dictionary information. alter table