oracle 觸發(fā)器 里定義變量盡量避免與表字段同名: 最近在調(diào)試的過程中發(fā)現(xiàn),oracle數(shù)據(jù)庫的觸發(fā)器中,,當(dāng)定義的變量與表字段相同時,,約束語句會不起作用,發(fā)生不可預(yù)知的錯誤,。應(yīng)當(dāng)盡量避免 s_strTaskID varchar(50); s_strTaskID := :NEW.strTaskID; SELECT nDetectType,strTimeCodeStart ,strTimeCodeEnd,strDuration FROM T_FCVSClipInfo where T_FCVSClipInfo.strTaskID = s_strTaskID and ((strTimeCodeStart >= strLSOM and strTimeCodeEnd <= strLEOM ) |
|