我有一个关于存储过程的问题。假设我的数据库中有2个表User
和Education
。数据库存储过程
Table User Table Education
UserID University
UserName Qualification
... Field of Study
... .........
.... .........
.... UserID
的问题,例如:有一个用户二度(教育),当我试图在程度的更新,它会同时更新程度。
这里是我的存储过程:
CREATE Procedure [dbo].[UpdateEducation]
@University,
@Qualification,
@FieldOfStudy,
@Grade,
@GDate,
@Location,
@Major,
@AddtionalInfo,
@UserID
AS
BEGIN
Update Education SET
University [email protected],
[email protected],
[email protected],
[email protected],
[email protected],
[email protected],
[email protected],
[email protected]
WHERE [email protected]
END
GO
希望有人能帮助我,我还是新来此。 Tq
您的教育表是否有主键?如果是这样,那是什么?如果不是,你怎么能唯一识别一个用户的教育记录? – Becuzz
嗨,你的意思是像教育ID? –
提供更好的标题! –