Null to not null | SoloLearn: Learn to code for FREE!

0

Null to not null

how make a column from null to not null

sql

9/3/2019 7:50:31 AM

Fareedoon Khan

2 Answers

New Answer

+1

You can change the content of the column with the UPDATE statement. You can change the table definition with the ALTER TABLE statement. The syntax may vary a bit among different database engines, for example in MySql it would be something like ALTER TABLE table_name MODIFY column_name VARCHAR(30) NOT NULL; If you have data in the table you may have to update all rows first that have null in this column.

0

table name Customers and column name ph1