123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- drop procedure if exists fnc_curr_reward_bal;
- create procedure fnc_curr_reward_bal()
- SQL SECURITY INVOKER
- BEGIN
- -- setup 변수들 --
- Declare _sgroup_id int;
- -- see manual int ---- https://dololak.tistory.com/257 Json Data extract
- SELECT json_extract(sorder_json, '$.OfcCode') from dbr_sorder where setup_code = 'office-info'
- END;
- SELECT json_extract(setup_json, '$.REyeLens.LongPd') from dbr_sorder where sorder_nosorder_no = '200928-152292'
- SET @json_k = '{
- "qqq": "aaa"
- }';
- SELECT json_extract(@json_k, '$.qqq');
- SELECT @json_k = JSON_replace(@json_k, "$.qqq", "kkk");
- SELECT @json_k;
- SELECT json_extract(@json_k, '$.qqq');
- select json_extract(json1, '$.REyeLens.Sph') from dbr_sorder where id =2 ;
- select json_replace(json1, '$.REyeLens.Sph', 'hhhh') from dbr_sorder where id =2 ;
- SET @json_k = '{
- "qqq": "aaa"
- }';
- update dbr_sorder set json1 = json_replace(@json_k, '$.REyeLens.Sph', 'qqeqrq')where id =2 ;
- SET @json_k = '{
- "qqq": "aaa"
- }';
- update dbr_sorder set json1 = json_replace(@json_k, '$.qqq', 'qqeqrq') where id =2 ;
|