views:

24

answers:

0

I wonder whether it is possible to create a CLR user-defined type in SQL Server 2008 members of which would be table variables.

You know, you can declare a table variable:

declare @foo table (row_id int not null ... );

So I fancy a UDT with several members, each of which is a table defined that way (a different table, of course), so it'd be possible to say:

select id from @typed_var.table1 where ...

or

insert into @typed_var.table3(id) values (...)

I do have a feeling I want too much on this one, but can't seem to find a definite Yes or No on the Internet.
Is it possible at all?