Professional Documents
Culture Documents
USE AdventureWorks2005
Select e.EmployeeID,e.Title, eph.Rate,eph.PayFrequency FROM HumanResources.Emplo
yee e
JOIN HumanResources.EmployeePayHistory eph ON e.EmployeeID = eph.EmployeeID
CREATE PROCEDURE PrcDept
AS
BEGIN
SELECT Name FROM HumanResources.Department
END
DROP PROCEDURE PrcDept
CREATE FUNCTION fx_Department_GName ( @GrName nvarchar(20) )
RETURNS Table
AS
RETURN (
SELECT * FROM HumanResources.Department WHERE GroupName=@GrName
)
GO
SELECT * FROM fx_Department_GName('Manufacturing')