{"id":4855,"date":"2012-05-29T09:11:01","date_gmt":"2012-05-29T09:11:01","guid":{"rendered":"http:\/\/phpcodez.com\/?p=4855"},"modified":"2012-05-29T09:11:01","modified_gmt":"2012-05-29T09:11:01","slug":"sql-primary-key","status":"publish","type":"post","link":"http:\/\/phpcodez.com\/sql-primary-key\/","title":{"rendered":"SQL PRIMARY KEY"},"content":{"rendered":"<p>SQL PRIMARY KEY uniquely identifies each record in a database table.<\/p>\n<p>Primary keys must contain unique values and \u00a0primary key column cannot contain NULL<\/p>\n<p>values. A table can not have more than one primary key .<\/p>\n<p><strong>Example<\/strong><\/p>\n<p>mysql&gt; CREATE TABLE \u00a0`new_users` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`));<br \/>\nQuery OK, 0 rows affected (0.10 sec)<\/p>\n<p><strong id=\"internal-source-marker_0.41529420716688037\"><br \/>\n<\/strong><\/p>\n","protected":false},"excerpt":{"rendered":"<p>SQL PRIMARY KEY uniquely identifies each record in a database table. Primary keys must contain unique values and \u00a0primary key column cannot contain NULL values. A table can not have more than one primary key . Example mysql&gt; CREATE TABLE \u00a0`new_users` (`id` int(11) NOT NULL AUTO_INCREMENT, `name` varchar(255) NOT NULL, PRIMARY KEY (`id`)); Query OK, &hellip; <a href=\"http:\/\/phpcodez.com\/sql-primary-key\/\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">SQL PRIMARY KEY<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[31],"tags":[332,370,392,457,461],"class_list":["post-4855","post","type-post","status-publish","format-standard","hentry","category-sql","tag-mysql","tag-php","tag-query","tag-sql","tag-statement"],"_links":{"self":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/4855","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/comments?post=4855"}],"version-history":[{"count":0,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/posts\/4855\/revisions"}],"wp:attachment":[{"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/media?parent=4855"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/categories?post=4855"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/phpcodez.com\/wp-json\/wp\/v2\/tags?post=4855"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}