CREATE procedure spActEx (@nombreexamen nvarchar(50), @puntaje int,
@fecha smalldatetime, @lee bit, @escribe bit,
@habla bit, @docidentidad varchar(30), @ididioma int) AS
if exists (select 1
from [ExamenIdiomas]
WHERE ([docidentidad]=@docidentidad) and ([nombreexamen]=@nombreexamen))
UPDATE [ExamenIdiomas]
SET [nombreexamen]=@nombreexamen,
[puntaje]= @puntaje,
[fecha]=@fecha,
[lee]=@lee,
[escribe]=@escribe,
[habla]=@habla,
[ididioma]=@ididioma
WHERE ([docidentidad]=@docidentidad)
and [nombreexamen]=@nombreexamen)