i have created a table.
CREATE TABLE [dbo].[tbl_Employee](
[empid] [int] IDENTITY(1,1) NOT NULL,
[name] [varchar](100) NULL,
[salary] [int] NULL
)
its workin fine, now i want that if i do not insert salary column then it does not enter null, it add any value like 1000
how can i do it?
Sql query
2 Answers
Know the answer? Post it. Somebody with the same question will find it here.

Pankaj PandeyRank #642 · 3.7K reputationPosted Jun 19, 2013, 5:03 AM EDT
CREATE TABLE [dbo].[tbl_Employee](
[empid] [int] IDENTITY(1,1) NOT NULL,
[name] [varchar](100) NULL,
[salary] [int] default 1000
)
you can put any value on place of 1000
mark as answered if helpfull.
RIM Singh46 reputationPosted Jun 19, 2013, 5:11 AM EDT
it works