sql query create column with default value code example
Example 1: add column table sql default value
ALTER TABLE users
ADD visit_number INT DEFAULT 0;
Example 2: how to check default value of column in sql server
SELECT object_definition(default_object_id) AS definition
FROM sys.columns
WHERE name ='colname'
AND object_id = object_id('dbo.tablename')