I have created a database table as follows
create table schedule (Id int, EmployeeName varchar(90), DateOfJoining date)
Now I have created a stored procedure with following parameters and date field automatically inserted by
create procedure Insert_Date_Automatically(
--Set no count ON To no longer get rows affected messages..
SET NOCOUNT ON
insert into schedule values(@ID,@EmpName,getdate())
Now the execution of procedure is
Exec Insert_Date_Automatically 2,'charlie'
as u can see only 2 parameters are passed in stored procedure but datefield is not been passed in stored procedure this field is been inserted by GETDATE() function as i said before. Senthilmcatyr, if this helps please login to Mark As Answer. | Alert Moderator