{"id":2459,"date":"2013-05-21T14:55:30","date_gmt":"2013-05-21T05:55:30","guid":{"rendered":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/?p=2459"},"modified":"2013-09-06T10:29:27","modified_gmt":"2013-09-06T01:29:27","slug":"sqlitecyeyey5","status":"publish","type":"post","link":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2013\/05\/21\/2459\/","title":{"rendered":"SQLite\u3067\u30c8\u30ea\u30ac\u30fc(5)"},"content":{"rendered":"<p>\u524d\u8a18\u4e8b\uff1a<a href=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2009\/12\/26\/1500\">SQLite\u3067\u30c8\u30ea\u30ac\u30fc(3)<\/a>||<a href=\"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/2009\/12\/28\/1510\">SQLite\u3067\u30c8\u30ea\u30ac\u30fc(4)<\/a><\/p>\n<p>\u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210\u65e5\u6642\u3068\u66f4\u65b0\u65e5\u6642\u3092\u81ea\u52d5\u7684\u306b\u66f4\u65b0\u3059\u308b\u8a2d\u5b9a\u3092\u66f8\u3044\u3066\u3044\u305f\u304c\u3001\u7d30\u5207\u308c\u306b\u8a18\u4e8b\u3092\u4f5c\u6210\u3057\u305f\u3089\u81ea\u524d\u3067\u4f5c\u696d\u3092\u53c2\u7167\u3057\u306b\u304f\u304f\u306a\u3063\u3061\u3083\u3063\u3066\u305f\u306e\u3067\u307e\u3068\u3081\u76f4\u3057\uff1a<\/p>\n<p>\u300c\u30c6\u30fc\u30d6\u30ebX\u3092\u4f5c\u6210\u3057\u3001created, modified\u306e\u65e5\u6642\u9805\u76ee\u3092\u3001\u305d\u308c\u305e\u308c\u4f5c\u6210\u6642\u3068\u66f4\u65b0\u6642\u306b\u81ea\u52d5\u66f4\u65b0\u3055\u305b\u308b\u300d<\/p>\n<p><strong>\u30c6\u30fc\u30d6\u30ebX\u306e\u4f5c\u6210\uff08\u4f5c\u6210\u6642\u60c5\u5831\u306fDEFAULT\u6307\u5b9a\u3001id\u30ab\u30e9\u30e0\u3092\u4e00\u610f\u6307\u5b9a\uff09<\/strong><\/p>\n<div class=\"hl-surround\" ><div class=\"hl-main\"><pre><span class=\"hl-reserved\">CREATE TABLE <\/span><span class=\"hl-identifier\">X <\/span><span class=\"hl-brackets\">(<\/span><span class=\"hl-identifier\">id <\/span><span class=\"hl-reserved\">INTEGER PRIMARY KEY<\/span><span class=\"hl-code\">,\r\n                <\/span><span class=\"hl-identifier\">created DATETIME <\/span><span class=\"hl-reserved\">DEFAULT <\/span><span class=\"hl-brackets\">(<\/span><span class=\"hl-identifier\">datetime<\/span><span class=\"hl-brackets\">(<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-string\">now<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-code\">,<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-string\">localtime<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-brackets\">))<\/span><span class=\"hl-code\">, <\/span><span class=\"hl-identifier\">modified DATETIME<\/span><span class=\"hl-brackets\">)<\/span><span class=\"hl-default\">;<\/span><\/pre><\/div><\/div>\n<p><strong>\u30c6\u30fc\u30d6\u30ebX\u306e\u66f4\u65b0\u6642\u30c8\u30ea\u30ac\u30fc\uff08\u66f4\u65b0\u6642\u60c5\u5831\u306f\u30c8\u30ea\u30ac\u30fc\u5185\u3067\u8a2d\u5b9a\u3001id\u30ab\u30e9\u30e0\u3067\u7279\u5b9a\uff09<\/strong><\/p>\n<div class=\"hl-surround\" ><div class=\"hl-main\"><pre><span class=\"hl-reserved\">CREATE TRIGGER <\/span><span class=\"hl-identifier\">X_trig_upd <\/span><span class=\"hl-reserved\">AFTER UPDATE ON <\/span><span class=\"hl-identifier\">X\r\n<\/span><span class=\"hl-reserved\">BEGIN\r\n  UPDATE <\/span><span class=\"hl-identifier\">X <\/span><span class=\"hl-reserved\">SET <\/span><span class=\"hl-identifier\">modified<\/span><span class=\"hl-default\">=<\/span><span class=\"hl-identifier\">datetime<\/span><span class=\"hl-brackets\">(<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-string\">now<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-code\">,<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-string\">localtime<\/span><span class=\"hl-quotes\">'<\/span><span class=\"hl-brackets\">) <\/span><span class=\"hl-reserved\">WHERE <\/span><span class=\"hl-identifier\">id<\/span><span class=\"hl-default\">=<\/span><span class=\"hl-reserved\">OLD<\/span><span class=\"hl-default\">.<\/span><span class=\"hl-identifier\">id<\/span><span class=\"hl-default\">;\r\n<\/span><span class=\"hl-reserved\">END<\/span><span class=\"hl-default\">;<\/span><\/pre><\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>\u524d\u8a18\u4e8b\uff1aSQLite\u3067\u30c8\u30ea\u30ac\u30fc(3)||SQLite\u3067\u30c8\u30ea\u30ac\u30fc(4) \u30c6\u30fc\u30d6\u30eb\u306e\u4f5c\u6210\u65e5\u6642\u3068\u66f4\u65b0\u65e5\u6642\u3092\u81ea\u52d5\u7684\u306b\u66f4\u65b0\u3059\u308b\u8a2d\u5b9a\u3092\u66f8\u3044\u3066\u3044\u305f\u304c\u3001\u7d30\u5207\u308c\u306b\u8a18\u4e8b\u3092\u4f5c\u6210\u3057\u305f\u3089\u81ea\u524d\u3067\u4f5c\u696d\u3092\u53c2\u7167\u3057\u306b\u304f\u304f\u306a\u3063\u3061\u3083\u3063\u3066\u305f\u306e\u3067\u307e\u3068\u3081\u76f4\u3057\uff1a \u300c\u30c6 [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"inline_featured_image":false,"footnotes":""},"categories":[1],"tags":[123],"_links":{"self":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2459"}],"collection":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/comments?post=2459"}],"version-history":[{"count":21,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2459\/revisions"}],"predecessor-version":[{"id":2488,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/posts\/2459\/revisions\/2488"}],"wp:attachment":[{"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/media?parent=2459"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/categories?post=2459"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/mechsys.tec.u-ryukyu.ac.jp\/~oshiro\/SiteList\/wp-json\/wp\/v2\/tags?post=2459"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}