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?
Loading
Pankaj PandeyPosted Jun 19, 2013, 9:03 AM
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 SinghPosted Jun 19, 2013, 9:11 AM
it works