sql server modify column code example
Example 1: sql server alter column
ALTER TABLE table_name
ALTER COLUMN column_name new_data_type(size);
Example 2: sql alter column size
ALTER TABLE table_name
ALTER COLUMN column_name datatype;
Example 3: sqlserver add column to table
ALTER TABLE dbo.doc_exa
ADD column_b VARCHAR(20) NULL,
column_c INT NULL ;
Example 4: update column sql server
UPDATE table_name
SET column1 = value1, column2 = value2, ...
WHERE condition;
Example 5: alter table modify column
-- ORACLE 18c
ALTER TABLE table_name
MODIFY column_name datatype;
-- Example
ALTER TABLE product
MODIFY description VARCHAR2(500 char);
Example 6: alter table query sql server change column
ALTER TABLE employees
ALTER COLUMN last_name VARCHAR(75) NOT NULL;