Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

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

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions