ADD or modify column in one call (upsert) - avoid DROP calls I have this call:
ALTER TABLE mbk_user ADD login_attempts int;         

I want to update it to:
ALTER TABLE mbk_user ADD login_attempts int NOT NULL; 

is there a way to do &quot;ADD or MODIFY&quot; in one sql statement (an upsert), or do I need to drop the column first and then ADD it again? I want to avoid drop statements ideally.
If I understand your question correctly, you just want to make the column NOT NULL. This can be done with the ALTER &lt;column_name&gt; sub-command
ALTER TABLE mbk_user ALTER login_attempts SET NOT NULL; 

Obviously this only works if there are no NULL values in that column.