解决方法
在单独的表中,如:
CREATE TABLE Company ( Id int identity primary key,Name nvarchar(100) not null UNIQUE --UNIQUE is optional ) GO CREATE TABLE CompanyPhones ( Id int identity primary key,Phone nvarchar(100) not null,CompanyId int NOT NULL REFERENCES Company(Id) ON DELETE CASCADE )
如何使用这些结构:
SELECT CompanyPhones.Phone FROM Company JOIN CompanyPhones ON Company.Id = CompanyPhones.CompanyId WHERE Company.Name=N'Horns and Hoogs Ltd.'