/jig_chothes_dml.sql Secret
Created
June 15, 2023 01:07
JSON列を含む表を更新するコード
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
begin | |
case :APEX$ROW_STATUS | |
when 'C' then | |
insert into jig_clothes( | |
name | |
,features | |
,price | |
) | |
values | |
( | |
:NAME | |
,json_object( | |
key 'color' value :COLOR | |
,key 'size' value :SIZE | |
) | |
,:PRICE | |
) | |
returning id into :ID; | |
when 'U' then | |
update jig_clothes set | |
name = :NAME | |
,features = json_object( | |
key 'color' value :COLOR | |
,key 'size' value :SIZE | |
) | |
,price = :PRICE | |
where id = :ID; | |
when 'D' then | |
delete from jig_clothes where id = :ID; | |
end case; | |
end; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment