下面的查询只需要很长的时间,下面的谓词只用于获取唯一的记录,因此想知道是否有不同的方法可以重写相同的查询而不多次调用下面的谓词,以获得唯一的ID。select max(c.id) from plocation c where c.ids = y.ids and c.idc = y.idc)select max(pr.id)
我希望每个客户端都有特定的产品(一对多的关系)我的代码:Create Table Client IDC int identity(1,1) not null primary key,) uniqueCreate Table ProdusIDP int identity(1,1) not null,Cantitate int,)Alter table Produs add constraint FK_Client_Produs_I