Since a project is now converted to Oracle, new contact Oracle, the stored procedure in the previous Sybase library must be changed to Oracle, how to write below? ? Thanks: BEGIN IF @@ TRANCOUNT> 0 SAVE TRAN TRAN_SEQ ELSE BEGIN BEGIN TRANSACTION TRAN_SEQ UPDATE table_1 SET number2 = number2 1 WHERE key = 'key' IF (@@ ROWCOUNT = 0) // this is the key to the oracle is not no_data_found ? INSERT INTO TABLE_1 .... / / 省 省, 如果 d d 没有 @@ Error <> 0 // error Begin Rollback Transaction TRAN_SEQ --SELECT 0 RETURN 101 End Select @ID = Number from Table_1 Where key = 'key' commit transaction Tran_seq return 100 End End I write the corresponding Oracle as follows: // The two sentences are wrong, what should I correspond in Oracle? If @@TRANCOUNT> 0 Save TRAN TRAN_1 / / The debugging of the lower side is passed, but no NO_DATA_FOUND, how to modify it? BEGIN TRANSACTION TRAN_1; UPDATE table_1 SET number2 = number2 1 WHERE key = 'key'; EXCEPTION WHEN NO_DATA_FOUN THEN BEGIN; INSERT INTO table_1 (number2, key) VALUES (1, 'key'); EXCEPTION WHEN OTHERS THEN ROLLBACK TRANSACTION TRAN_1; Return 1111; end; end; select number2 INTO ID from Table_1 Where Key = 'key'; commit transaction tran_1; return 100;