{"id":683,"date":"2018-05-30T12:51:17","date_gmt":"2018-05-30T04:51:17","guid":{"rendered":"https:\/\/blog.freesilo.com\/?p=683"},"modified":"2018-05-30T12:51:17","modified_gmt":"2018-05-30T04:51:17","slug":"sql%e4%bf%ae%e6%94%b9%e7%ba%a6%e6%9d%9f","status":"publish","type":"post","link":"https:\/\/freesilo.com\/?p=683","title":{"rendered":"SQL\u4fee\u6539\u7ea6\u675f"},"content":{"rendered":"<pre class=\"brush: sql; title: ; notranslate\" title=\"\">\r\n--\u5220\u9664\u7ea6\u675f\r\nALTER TABLE CustomData DROP CONSTRAINT FK_CustomData_CustomFormatInfo\r\nGO\r\n--\u5173\u95ed\u9012\u589e\u63d2\u5165\u5c5e\u6027\r\nSET IDENTITY_INSERT OFF\r\n--\u6253\u5f00\u9012\u589e\u63d2\u5165\u5c5e\u6027\r\nSET IDENTITY_INSERT ON\r\n--\u4fee\u6539\u589e\u52a0\u7ea6\u675f\r\nALTER TABLE &#x5B;CustomFormatInfo] WITH NOCHECK ADD \r\n    CONSTRAINT &#x5B;PK_CustomFormatInfo] PRIMARY KEY  CLUSTERED \r\n    (\r\n        &#x5B;CustomFormatID]\r\n    )  ON &#x5B;PRIMARY] \r\nGO\r\n--\u4fee\u6539\u8868\u589e\u52a0\u5916\u952e\u7ea6\u675f\r\nALTER TABLE &#x5B;CustomData] ADD \r\n    CONSTRAINT &#x5B;FK_CustomData_CustomFormatInfo] FOREIGN KEY \r\n    (\r\n        &#x5B;CustomFormatID]\r\n    ) REFERENCES &#x5B;CustomFormatInfo] (\r\n        &#x5B;CustomFormatID]\r\n    )\r\nGO\r\n<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>&#8211;\u5220\u9664\u7ea6\u675f ALTER TABLE CustomData DROP CONST&#8230;<br \/><a class=\"read-more-button\" href=\"https:\/\/freesilo.com\/?p=683\">Read more<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-683","post","type-post","status-publish","format-standard","hentry","category-sql"],"_links":{"self":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/683","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=683"}],"version-history":[{"count":1,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/683\/revisions"}],"predecessor-version":[{"id":689,"href":"https:\/\/freesilo.com\/index.php?rest_route=\/wp\/v2\/posts\/683\/revisions\/689"}],"wp:attachment":[{"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=683"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=683"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/freesilo.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=683"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}