--定义一个数据类型
create type userlist_tabletype as table(
id int not null default 0,
name varchar(50) not null default ''
)
go
--定义存储过程
create proc dbo.pr_usetabletype
@t userlist_tabletype readonly
as
select * from @t
go
--测试
declare @tb userlist_tabletype
insert into @tb (id,name) values (1,'henry'),(2,'lily'),(3,'jason')
exec pr_usetabletype @tb