Devendra  Kumar

Devendra Kumar

  • NA
  • 517
  • 245.7k

how to insert my flag true or false in sqlserver

Jul 7 2016 1:59 AM
hello friends please solve this query
 
i have one table like: category
 
and there field like:
 
Category_Id int,
Category_Name varchar(50),
 
cat_IsSizeRequired  bit 
 
 
and  cat_IsSizeRequired  this column default value set ((0))
 
and than
 
insert time my query like
 
Category_Id int,
@Category_Name varchar(250),
@cat_IsSizeRequired bit
 
 
insert into dbo.Tbl_Category(Category_Name,cat_IsSizeRequired) values(@Category_Name,@cat_IsSizeRequired)
 
this and i want when insert
 
query
 
if i check  cat_IsSizeRequired is true it insert true else default value false please any body tell me 
 
sorry for my bad English 
 
 
 
 

Answers (7)