<p>We've been trying to alter a lot of columns from nullable to not nullable, which involves dropping all the associated objects, making the change, and recreating the associated objects.</p>

<p>We've been using SQL Compare to generate the scripts, but I noticed that SQL Compare doesn't script statistic objects. Does this mean its ok to drop them and the database will work as well as it did before without them, or have Red Gate missed a trick?</p>

[{'answer_id': 20402, 'author': 'TheSmurf', 'author_id': 1975282, 'author_profile': 'https://Stackoverflow.com/users/1975282', 'pm_score': 1, 'selected': False, 'text': '<p>Why are you dropping objects? Seems to me the sequence should be a lot simpler, and less destructive: assign all of these objects a default value, then make the change to not nullable.</p>\n'}, {'answer_id': 20410, 'author': 'Stu', 'author_id': 414, 'author_profile': 'https://Stackoverflow.com/users/414', 'pm_score': 0, 'selected': False, 'text': '<p>Statistics are too data-specific to be tooled. It would be potentially very inefficient to blindly re-create them on a data set.</p>\n'}, {'answer_id': 20417, 'author': 'SQLMenace', 'author_id': 740, 'author_profile': 'https://Stackoverflow.com/users/740', 'pm_score': 2, 'selected': False, 'text': '<p>If you have update stats and auto create stats on then it should works as before\nYou can also run <code>sp_updatestats</code> or <code>UPDATE STATISTICS WITH FULLSCAN</code> after you make the changes</p>\n'}, {'answer_id': 20486, 'author': 'Eric Z Beard', 'author_id': 1219, 'author_profile': 'https://Stackoverflow.com/users/1219', 'pm_score': 3, 'selected': True, 'text': '<p>It is considered best practice to auto create and auto update statistics.  Sql Server will create them if it needs them.  You will often see the tuning wizard generate lots of these, and you will also see people advise that you update statistics as a part of your maintenance plan, but this is not necessary and might actually make things worse, just so long as auto create and auto update are enabled.</p>\n'}]
['https://Stackoverflow.com/questions/20392', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/2086/']