Can someone help me complete the below task.
How can I prevent a column from allowing null and allowing a column from Null to not allow null.
Use ALTER TABLE table_name ALTER COLUMN column_name datatype [NOT] NULL
ALTER TABLE table_name ALTER COLUMN column_name datatype [NOT] NULL
Example:
CREATE TABLE #Foo ( X INT NULL, Y INT NOT NULL ) /*This is metadata only change and very quick*/ ALTER TABLE #Foo ALTER COLUMN Y INT NULL /*This requires all rows to be scanned to validate the data*/ ALTER TABLE #Foo ALTER COLUMN X INT NOT NULL
Source: https://habr.com/ru/post/898357/More articles:Selenium Script For IE - internet-explorerGenerate an object model from RelaxNG schema using RNGOM - how to get started? - javaDoes Facebook support OAuth 2.0? - oauthMysql From enumeration to tinyint problems - mysqlHow to use foreign keys in SQL Buddy? - sqlAzure - How to use local storage blob - windowsAnalysis of time complexity algorithms - algorithmSum of three variables: strange behavior - javascriptHow to convert the WordOpenXML property to the System.IO.Packaging.Package package? - c #Why does git ignore all files in a directory except one? - gitAll Articles