@Senthilmcatyr,
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
GETDATE()
create procedure Insert_Date_Automatically(
@ID int,
@EmpName varchar(90))
as
begin
--Set no count ON To no longer get rows affected messages..
SET NOCOUNT ON
insert into schedule values(@ID,@EmpName,getdate())
end
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.
Thanks & Regards,
Senthilmcatyr, if this helps please login to Mark As Answer. | Alert Moderator