Thanks for your instruction, i am familiar with junction table, but i look a way to implement something like inheritance. In addition i agree with you for encapsulating by stored procedures.
Your request still doesn't make sense. If you MUST think of sql as objects think of the table as the object and each row as the instance and each column is the property. What you are describing is you want to inherit the row. This doesn't make sense because in OOP that would be like inheriting the properties of an instance. It doesn't work like that. You inherit the object.
I think that what you are really trying to do is to have a parent - child relationship in sql. This of course is not only possible, it is a fundamental base for normalized data.
Is the following example something along the lines of what you talking about?
create table #Parent
ParentID int identity,
create table #Child
ChildID int identity,
select 'Parent 1' union all
select 'Parent 2'
select 1, 'Child 1' union all
select 1, 'Child 2' union all
select 2, 'Child 3' union all
select 2, 'Child 4' union all
select 2, 'Child 5'
from #Parent p
join #Child c on p.ParentID = c.ParentID
drop table #Parent
drop table #Child
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/
for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter
.Cross Tabs and Pivots, Part 1 – Converting Rows to Columns Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs Understanding and Using APPLY (Part 1)Understanding and Using APPLY (Part 2)