how to pass default value to date parametere in storedprocedure - Sqlserver 2008?
问题 Here it is my stored procedure: ALTER proc [dbo].[allrecp] @peid int=0, @pename varchar(20)='', @pdes varchar(20)='', @pdoj date='1111-1-1', @sal money=0, @dept int=0, @loc int=0,@i int=0 as begin if(@i=1) begin insert into Employee values(@pename,@pdes,@pdoj,@sal,@dept,@loc) end if(@i=2) begin update Employee set ENAME=@pename,DESEGNATION=@pdes,DOJ=@pdoj,SALARY=@sal,DEPTID=@dept,LOCATIONID=@loc WHERE EMPID=@peid end if(@i=3) delete EMPLOYEE where EMPID=@peid end And my c# code is: private