Create table tblMenu
(
Id int primary key identity,
MenuText nvarchar(30),
ParentId int foreign key references tblMenu(Id),
Active bit
)
Go
Insert into tblMenu values('USA', NULL, 1)
Insert into tblMenu values('India', NULL, 1)
Insert into tblMenu values('UK', NULL, 1)
Insert into tblMenu values('Australia', NULL, 1)
Insert into tblMenu values('Virginia', 1, 1)
Insert into tblMenu values('Maryland', 1, 1)
Insert into tblMenu values('AP', 2, 1)
Insert into tblMenu values('MP', 2, 1)
Insert into tblMenu values('Karnataka', 2, 1)
Insert into tblMenu values('Bangalore', 9, 1)
Insert into tblMenu values('Mangalore', 9, 1)
Insert into tblMenu values('Mysore', 9, 0)
Go