{"id":240,"date":"2014-01-29T20:32:41","date_gmt":"2014-01-29T11:32:41","guid":{"rendered":"http:\/\/wp.ultimai.org\/wp\/?p=240"},"modified":"2014-02-01T15:44:48","modified_gmt":"2014-02-01T06:44:48","slug":"procedure","status":"publish","type":"post","link":"http:\/\/wp.ultimai.org\/?p=240","title":{"rendered":"mysql\u306e\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3"},"content":{"rendered":"<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\ndelimiter \/\/\r\nCREATE PROCEDURE get_comment(IN id INT)\r\nBEGIN \r\nselect content from comment where entry_id = id;\r\nEND\r\n<\/pre>\n<ul>\n<li>\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u540d stad<\/li>\n<li>\u30c6\u30fc\u30d6\u30eb\u540d : comment<\/li>\n<li>\u30c6\u30fc\u30d6\u30eb\u540d : entry<\/li>\n<li>\u3053\u308c\u3067\u4f5c\u6210\u2193<\/li>\n<\/ul>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\nCREATE TABLE entry (\r\n    id int auto_increment primary key,\r\n    title varchar(255),\r\n    body text,\r\n    delete_flag tinyint default 0\r\n);\r\n \r\nCREATE TABLE comment (\r\n    id int auto_increment primary key,\r\n    name varchar(255),\r\n    content varchar(255),\r\n    entry_id int not null\r\n);\r\n<\/pre>\n<p>\n\u3053\u308c\u3067entry_id\u304c1\u306e\u30ec\u30b3\u30fc\u30c9\u3092select\u3067\u304d\u308b\uff61\n<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\ncall get_comment(1);\r\n<\/pre>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">\r\n\r\ndelimiter \/\/\r\nCREATE PROCEDURE get_category(IN id INT)\r\nBEGIN \r\nselect * from m_shohin where cat_ID = id;\r\nEND\r\n<\/pre>\n<p>\u30b9\u30c8\u30a2\u30c9\u30d7\u30ed\u30b7\u30fc\u30b8\u30e3\u306e\u524a\u9664<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">DROP PROCEDURE get_category<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>delimiter \/\/ CREATE PROCE [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4],"tags":[],"class_list":["post-240","post","type-post","status-publish","format-standard","hentry","category-mysql"],"_links":{"self":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/240","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=240"}],"version-history":[{"count":0,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=\/wp\/v2\/posts\/240\/revisions"}],"wp:attachment":[{"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=240"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=240"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/wp.ultimai.org\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=240"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}