CREATE PROC SP_DAVE AS BEGIN update mytable set st = getdate() where date = getdate(); if @@rowcount != 1 begin RAISERROR ('No Rows !!',16,1); RETURN -1; end RETURN 0; END;