Question: The following SQL statements create a table type and an inline table-valued function to retrieve information of multiple employees. Please write SQL statements to retrieve

The following SQL statements create a table type and an inline table-valued function to retrieve information of multiple employees. Please write SQL statements to retrieve information of employees with SSN '123456789', '987987987', and '987654321'.

create type EMP_TYPE as table (

SSN char(9) primary key

);

GO

create function fgetEmp

(

@emps EMP_TYPE READONLY

)

RETURNS TABLE

AS

return (select * from Employee where ssn in (select SSN from @emps))

GO

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!