Şöyle yaparız
CREATE TABLE `kv` (`key` varchar(32) NOT NULL PRIMARY KEY,`val` JSON,);INSERT INTO kvSET `key` = 'test', val = '{"name": "val"}'ON DUPLICATE KEY UPDATE val = '{"name": "val"}';SELECT val FROM kv WHERE `key` = 'test' LIMIT 1;
CREATE TABLE `kv` (`key` varchar(32) NOT NULL PRIMARY KEY,`val` JSON,);INSERT INTO kvSET `key` = 'test', val = '{"name": "val"}'ON DUPLICATE KEY UPDATE val = '{"name": "val"}';SELECT val FROM kv WHERE `key` = 'test' LIMIT 1;
Örnek Şöyle yaparız CREATE EVENT myevent ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 1 HOUR DO UPDATE myschema.mytable SET myc...
Hiç yorum yok:
Yorum Gönder