Adding new column in existing table with default value in Sql


Here i'm going to explain how to add a new column with default value in sql.We need follow the below syntax to add new column.

ALTER TABLE table_name add column_name int NOT NULL DEFAULT(1)

(e.g)
ALTER TABLE Employee add emp_age int NOT NULL DEFAULT(18)


Comments

Popular posts from this blog

Types of Architects

Basic measurements

Search html table contents based on its td using Jquery