I have the following column in table room Now I want to change the definition of column property_id from NULL to NOT NULL How can I do this
following Query is not working
ALTER TABLE `room` CHANGE `property_id` `property_id` bigint(20) NOT NULL;
Actual definition of Column is :
`property_id` bigint(20) DEFAULT NULL,
NULLbefore your change the table definition?NULLwhen you change the column definition. What you need to do with your data depends on your data and how you use it.NULLfirst otherwise if will conflict the column properties