如何将代码从SQL Server转换为Oracle

时间:2015-06-27 21:14:53

标签: sql-server oracle

我在SQL Server中编写了这段代码。我想为Oracle和PL / SQL编写此代码。任何人都可以帮我解决这个问题吗?

SQL Server / T-SQL:

ALTER TRIGGER [dbo].[checkBalance]
   ON  [dbo].[Orders]
FOR insert
AS
BEGIN
    IF (SELECT goodcount FROM goods WHERE id=(SELECT gid FROM Inserted)) < (SELECT gcount FROM Inserted)
    BEGIN
        RAISERROR ('Inventory is low',10,1)
        rollback
    END 

1 个答案:

答案 0 :(得分:0)

就像这样

[MMPickerView showPickerViewInView:self.view
                         withStrings:strings
                         withOptions:nil
                          completion:^(NSString *selectedString) {
                          //selectedString is the return value which you can use as you wish
    self.label.text = selectedString;
}];