I would like to alter the table if the table has the column with same data type and number exists
Original tTable structure is
TableName
ColumnName NVARCHAR(100)
Code for altering column if ColumnName
with NVARCHAR
and length 100 exists
IF EXISTS(...)
BEGIN
ALTER TABLE [dbo].[TableName]
ALTER COLUMN [ColumnName] NVARCHAR(200) [NULL|NOT NULL]
END
What find query I need to insert at IF EXISTS(...)
?
sql-server
versions??? just put the version you are working on !!! – Intrigante