Monday 7 October 2013

13. Write a query to create a rule on the GroupName column of the Department table to accept only three values: Research and Development, Sales and Marketing, and Manufacturing.

create Rule groupType
as
@gType in ('Research and Development',
'sales and Marketing',
'Manufacturing')
go
sp_bindrule 'groupType', 'HumanResorces.Department.
GroupName'

No comments:

Post a Comment