createfunction dbo.edf (@job_iddecimal(20)) returns@temptabletable ( fname varchar(20), minit char(1), lname varchar(30), job_id smallint ) as begin insert@temptable select e.fname,e.minit,e.lname,e.job_id from employee as e where e.job_id>@job_id return end select*from edf(13)