22,210
社区成员
发帖
与我相关
我的任务
分享
if not object_id(N'UsersGroup') is null
drop table UsersGroup
Go
Create table UsersGroup([ID] INT PRIMARY KEY,[UsersGroup] nvarchar(22))
Insert UsersGroup
select 1,N'一组' union all
select 2,N'二组'
GO
if not object_id(N'Users') is null
drop table Users
Go
Create table Users([ID] int,[UsersGroupID] INT FOREIGN KEY REFERENCES dbo.UsersGroup(ID))
Go