I'm trying to change my SQL server database by adding another column to a table with 0 as a default value.
I thought this script worked in the past (for another table), but now I have an error when I try to execute the script
The script
ALTER TABLE Whatever
ADD WhateverColumn tinyint NOT NULL
DEFAULT(0)
The errors
- On hovering mouse over "NOT": Incorrect syntax near 'NOT'. Expecting 'TO'
- On hovering mouse over "0": Incorrect syntax near 0. Expecting '(', or SELECT
Anyone knows what's wrong with this?