{"id":800,"date":"2021-04-21T20:16:22","date_gmt":"2021-04-21T14:46:22","guid":{"rendered":"https:\/\/selfimagination.in\/tips\/?p=800"},"modified":"2022-06-03T17:41:29","modified_gmt":"2022-06-03T12:11:29","slug":"primary-key","status":"publish","type":"post","link":"https:\/\/selfimagination.in\/tips\/primary-key\/","title":{"rendered":"How to Add Primary Key"},"content":{"rendered":"\n<p class=\"wp-block-zozuk-wphindi\">Record \u0915\u094b Uniquely Identify \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0939\u092e\u0947\u0902 Primary Key \u0915\u0940 \u0906\u0935\u0936\u094d\u092f\u0915\u0924\u093e \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 \u090f\u0915 \u0938\u0947 \u0905\u0927\u093f\u0915 Key \u0915\u094b Merge \u0915\u0930\u0915\u0947 \u092d\u0940 Primary Key \u092c\u0928\u093e\u0908 \u091c\u093e \u0938\u0915\u0924\u0940 \u0939\u0948\u0902  \u091c\u092c \u092d\u0940 \u0939\u092e \u0915\u094b\u0908 \u092d\u0940 \u091f\u0947\u092c\u0932 \u092c\u0928\u093e\u0924\u0947 \u0939\u0948\u0902 \u0924\u094b \u0909\u0938\u0947 \u0939\u092e\u0947\u0902 \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u0947 \u091c\u0930\u0942\u0930 \u092c\u0928\u093e\u0928\u093e \u091a\u093e\u0939\u093f\u090f \u092f\u0939 Unique \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 \u091c\u093f\u0938\u0938\u0947 \u0939\u092e\u0947\u0902 \u0915\u093f\u0938\u0940 \u092d\u0940 \u0930\u093f\u0915\u0949\u0930\u094d\u0921 \u0915\u094b Identify \u0915\u0930\u0928\u093e \u092c\u0939\u0941\u0924 \u0906\u0938\u093e\u0928 \u0939\u094b \u091c\u093e\u0924\u093e \u0939\u0948\u0902 \u0914\u0930 \u092b\u093c\u093e\u0938\u094d\u091f \u092d\u0940 \u0939\u094b \u091c\u093e\u0924\u093e \u0939\u0948\u0902 \u0964<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">What is Primary Key? \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u0940 \u0915\u094d\u092f\u093e \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 ?<\/h2>\n\n\n\n<p>\u091c\u092c \u092d\u0940 \u0939\u092e\u0947 \u0915\u093f\u0938\u0940 \u092d\u0940 \u091f\u0947\u092c\u0932 \u092e\u0947 \u0915\u093f\u0938\u0940 Row \u0915\u094b Unique Identify \u0915\u0930\u0928\u093e \u0939\u094b \u0924\u092c \u0939\u092e \u091c\u093f\u0938 Column Value \u0915\u094b \u0906\u0927\u093e\u0930 \u092e\u093e\u0928\u0924\u0947 \u0939\u0948\u0902 \u0909\u0938\u0947 \u0939\u0940 primary key \u0915\u0939\u093e \u091c\u093e\u0924\u093e \u0939\u0948\u0902 \u0964 \u0909\u0926\u093e\u0939\u0930\u0923 \u0915\u0947 \u0932\u093f\u090f \u092f\u0926\u093f \u0939\u092e\u093e\u0930\u0947 \u092a\u093e\u0938 Students Record \u0939\u0948\u0902 \u0924\u094b \u0909\u0938\u092e\u0947 Scholar Number Primary Key \u0939\u094b\u0917\u093e \u0915\u094d\u092f\u094b\u0902\u0915\u093f \u092a\u094d\u0930\u0924\u094d\u092f\u0947\u0915 Student \u0915\u093e Scholar Number \u0905\u0932\u0917 \u0905\u0932\u0917 \u0939\u094b\u0924\u093e \u0939\u0948\u0902 \u0964 <\/p>\n\n\n\n<p>Primary Key Unique \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 \u0914\u0930 \u0915\u092d\u0940 \u092d\u0940 Null Value Accept \u0928\u0939\u0940\u0902 \u0915\u0930\u0924\u0940 \u0939\u0948\u0902 \u0964 \u092f\u0926\u093f \u0939\u092e \u0915\u093f\u0938\u0940 table \u0915\u0947 \u0915\u093f\u0938\u0940 Column \u0915\u094b Primary Key \u092c\u0928\u093e \u0926\u0947\u0924\u0947 \u0939\u0948\u0902 \u0924\u092c \u0935\u0939 Column \u0928 \u0939\u0940 null \u0939\u094b\u0917\u093e \u0913\u0930 \u0928 \u0939\u0940 \u0909\u0938\u092e\u0947 Duplicate Value Store \u0939\u094b\u0917\u0940\u0964 <\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Uses of Primary Key? \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u0947 \u0909\u092a\u092f\u094b\u0917 \u0915\u094d\u092f\u093e \u0939\u0948\u0902 ?<\/h2>\n\n\n\n<p>\u091c\u092c \u092d\u0940 \u0939\u092e \u0915\u093f\u0938\u0940 Table \u092e\u0947 Primary Key \u092c\u0928\u093e \u0932\u0947\u0924\u0947 \u0939\u0948\u0902 \u0924\u092c \u0939\u092e \u0915\u093f\u0938\u0940 \u092d\u0940 Record \u0915\u094b Select \u0915\u0930\u0928\u0947 Update \u0915\u0930\u0928\u0947 \u0914\u0930 Delete \u0915\u0930\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f Primary Key Column \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0924\u0947 \u0939\u0948\u0902 \u0964 <\/p>\n\n\n\n<p>\u0939\u092e \u0915\u0939 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u0915\u0940 \u092f\u0926\u093f \u0939\u092e\u0947 Detabase Table \u0938\u0947 \u092f\u0926\u093f \u0915\u094b\u0908 Query \u0915\u0930\u0928\u0940 \u0939\u094b \u0924\u094b \u0939\u092e Primary Key \u0915\u0947 \u0906\u0927\u093e\u0930 \u092a\u0930 \u0906\u0938\u093e\u0928\u0940 \u0938\u0947 Data Retrive \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u0964 \u092f\u0926\u093f \u0915\u093f\u0938 Particular Row \u0915\u094b update \u0915\u0930\u0928\u093e \u0939\u094b \u0924\u094b \u0939\u092e Primary Key \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930 \u0909\u0938\u0947 \u0906\u0938\u093e\u0928\u0940 \u0938\u0947 Update \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948 \u0964 \u0938\u093e\u0925 \u0939\u0940 \u092e\u0947 \u092f\u0926\u093f \u0939\u092e\u0947 \u0915\u093f\u0938\u0940 Particular Row \u0915\u094b Delete \u0915\u0930\u0928\u093e \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 \u0924\u092c \u092d\u0940 \u0939\u092e Primary Key \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930 Delete \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902  \u0964 <\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">Primary Key Benefits | \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u0940 \u0915\u0947 \u092b\u093e\u092f\u0926\u0947 <\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><strong>Fast<\/strong> &#8211; \u092c\u0939\u0941\u0924 \u095e\u093e\u0938\u094d\u091f \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 <\/li><li>\u0907\u0938\u0932\u093f\u090f \u0906\u0938\u093e\u0928\u0940 \u0938\u0947 \u090f\u0915\u094d\u0938\u0947\u0938 \u0915\u0930 \u092a\u093e\u0924\u0947 \u0939\u0948\u0902 <\/li><li><strong>Base <\/strong>&#8211; \u092f\u0926\u093f \u091f\u0947\u092c\u0932 \u092a\u0930 \u091f\u094d\u0930\u093f\u0917\u0930 \u0932\u093f\u0916\u0928\u093e \u0939\u094b \u0924\u094b \u092d\u0940 \u0906\u0938\u093e\u0928\u0940 \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 \u0915\u094d\u092f\u0941\u0915\u0940 \u0907\u0938\u0915\u0947 \u0906\u0927\u093e\u0930 \u092a\u0930 \u0939\u092e \u0921\u093e\u091f\u093e \u0907\u0928\u094d\u0938\u0930\u094d\u091f \u0905\u092a\u0921\u0947\u091f \u0914\u0930 \u0921\u093f\u0932\u0940\u091f \u0915\u0930\u0924\u0947 \u0939\u0948\u0902 <\/li><li>\u0905\u092a\u0928\u0947 \u0906\u092a \u0907\u0902\u0921\u0947\u0915\u094d\u0938 \u092c\u0928 \u091c\u093e\u0924\u0947 \u0939\u0948\u0902 \u0924\u094b \u0921\u093e\u092f\u0930\u0947\u0915\u094d\u091f \u090f\u0915\u094d\u0938\u0947\u0938 \u0939\u094b \u091c\u093e\u0924\u093e \u0939\u0948\u0902 <\/li><\/ul>\n\n\n\n<p><a href=\"https:\/\/youtu.be\/DkBS3wD5HWk\" target=\"_blank\" rel=\"noopener\">Primary Key \u0915\u0947 \u092c\u093e\u0930\u0947 \u092e\u0947 \u0935\u093f\u0921\u093f\u0913 \u0915\u0947 \u092e\u093e\u0927\u094d\u092f\u092e \u0938\u0947 \u0938\u092e\u091d\u0928\u0947 \u0915\u0947 \u0932\u093f\u090f \u0915\u094d\u0932\u093f\u0915 \u0915\u0930\u0947 <\/a><\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">ADD PRIMARY KEY to Existing Table<\/h2>\n\n\n\n<p>\u0935\u0948\u0938\u0947 \u0924\u094b Table \u092c\u0928\u093e\u0924\u0947 \u0938\u092e\u092f \u0939\u0940 Primary Key Add \u0915\u0930 \u0926\u0940 \u091c\u093e\u0924\u0940 \u0939\u0948\u0902 \u0932\u0947\u0915\u093f\u0928 \u092f\u0926\u093f \u0906\u092a \u092c\u093e\u0926 \u092e\u0947\u0902 Primary Key Add \u0915\u0930 \u0930\u0939\u0947 \u0939\u0948\u0902 \u0924\u094b  \u0907\u0938 Syntax \u0938\u0947 \u0906\u092a \u091f\u0947\u092c\u0932 \u092e\u0947\u0902 Primary Key \u0910\u0921 \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u0964<\/p>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">ALTER TABLE &lt;TABLE NAME&gt; ADD PRIMARY KEY (COLUMN NAME 1 , COLUMN NAME 2 );<\/code><\/pre>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\">\u091c\u093f\u0938 \u091f\u0947\u092c\u0932 \u092e\u0947\u0902 \u092a\u0939\u0932\u0947 \u0938\u0947 \u0915\u094b\u0908 Primary Key \u0928\u0939\u0940\u0902 \u092c\u0928\u0940 \u0939\u094b \u0914\u0930 \u092a\u0939\u0932\u0940 \u092c\u093e\u0930 Primary Key \u092c\u0928\u093e\u0928\u093e \u0939\u094b \u0924\u094b \u0907\u0938 SQL \u0938\u0947 \u0906\u092a Primary Key Add \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u0964 <\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">DROP PRIMARY KEY<\/h2>\n\n\n\n<p>\u091c\u092c \u0939\u092e\u0947\u0902 \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u0947 \u0915\u094b \u091f\u0947\u092c\u0932 \u0938\u0947 Remove \u0915\u0930\u0928\u093e \u0939\u094b \u092f\u093e \u0939\u092e\u0947\u0902 \u0914\u0930 \u0915\u094b\u0908 Column Primary Key \u092e\u0947\u0902 Add \u0915\u0930\u0928\u093e \u0939\u094b \u0924\u094b \u0939\u092e\u0947\u0902 \u092a\u0939\u0932\u0947 Primary Key \u0915\u094b Drop \u0915\u0930\u0928\u093e \u0939\u094b\u0924\u093e \u0939\u0948\u0902\u0964  \u0907\u0938 Syntax \u0938\u0947 \u0939\u092e  Primary Key \u0915\u094b \u0921\u093f\u0932\u0940\u091f \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 \u0964<\/p>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">ALTER TABLE &lt;TABLE NAME&gt; DROP PRIMARY KEY<\/code><\/pre>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\">\u092f\u0926\u093f \u0939\u092e\u0947\u0902 \u092a\u0939\u0932\u0947 \u0938\u0947 \u092c\u0928\u0940 Primary Key \u0915\u094b \u0921\u093f\u0932\u0940\u091f \u0915\u0930\u0928\u093e \u0939\u094b \u0924\u094b \u0939\u092e DROP PRIMARY KEY \u0915\u093e \u0909\u092a\u092f\u094b\u0917 \u0915\u0930\u0924\u0947 \u0939\u0948\u0902 \u092f\u0926\u093f \u0939\u092e\u0947\u0902 \u0915\u094b\u0908 \u092c\u0926\u0932\u093e\u0935 \u0915\u0930\u0928\u093e \u0939\u094b \u0924\u094b \u092a\u0939\u0932\u0947 DROP SQL Execute \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u0940 \u0909\u0938\u0915\u0947 \u092c\u093e\u0926 ADD PRIMARY SQL Execute \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u0940 <\/p>\n\n\n\n<hr class=\"wp-block-separator has-css-opacity\"\/>\n\n\n\n<h2 class=\"wp-block-heading\">ADD PRIMARY KEY Existence Column with Data<\/h2>\n\n\n\n<p>\u092f\u0926\u093f \u092a\u0939\u0932\u0947 \u0938\u0947 \u092c\u0928\u0940 \u0939\u0941\u0908  \u091f\u0947\u092c\u0932 \u091c\u093f\u0938\u092e\u0947 \u0921\u093e\u091f\u093e \u092d\u0940 Inserted \u0939\u094b \u0914\u0930 \u0915\u093f\u0938\u0940 Column \u092a\u0930 Primary \u092c\u0928\u093e\u0928\u093e \u0939\u094b \u0924\u094b \u0915\u094d\u092f\u093e \u0915\u0930\u0947 ?<\/p>\n\n\n\n<p>\u092c\u0939\u0941\u0924 \u0938\u0940 \u092c\u093e\u0930 Live \u092a\u094d\u0930\u094b\u091c\u0947\u0915\u094d\u091f \u092a\u0930 \u0915\u093e\u092e \u0915\u0930\u0924\u0947 \u0939\u0941\u090f \u0939\u092e\u0947\u0902 \u092a\u0924\u093e \u091a\u0932\u0924\u093e \u0939\u0948\u0902 \u0915\u0940 Primary Key \u092c\u0928\u093e\u0928\u093e \u0925\u0940 \u0914\u0930 \u0939\u092e \u0928\u0939\u0940\u0902 \u092c\u0928\u093e \u092a\u093e\u090f \u0924\u094b \u0907\u0928 \u0938\u094d\u091f\u0947\u092a\u094d\u0938 \u0938\u0947 \u0906\u092a \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u092c\u0928\u093e \u0938\u0915\u0924\u0947 \u0939\u0948\u0902<\/p>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\"><strong>\u092a\u0939\u0932\u0947 \u0938\u0947 Inserted \u0921\u093e\u091f\u093e \u092e\u0947\u0902 \u092f\u0926\u093f Primary Key \u092c\u0928\u093e\u0928\u093e \u0939\u0948\u0902 \u0924\u094b \u0939\u092e\u0947\u0902 \u0928\u093f\u092e\u094d\u0928 \u0915\u093e\u0930\u094d\u092f \u0915\u0930\u0928\u093e \u0939\u094b\u0902\u0917\u0947 <\/strong><\/p>\n\n\n\n<ol class=\"wp-block-list\"><li>\u0938\u092c\u0938\u0947 \u092a\u0939\u0932\u0947 \u0921\u0941\u092a\u094d\u0932\u0940\u0915\u0947\u091f \u0930\u093f\u0915\u0949\u0930\u094d\u0921 \u0939\u091f\u093e\u0928\u0947 \u0939\u094b\u0902\u0917\u0947 <\/li><li>\u0909\u0938\u0915\u0947 \u092c\u093e\u0926 \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u0940 \u0915\u094b \u0921\u094d\u0930\u093e\u092a \u0915\u0930\u0947\u0902\u0917\u0947 <\/li><li>\u092b\u093f\u0930 \u091c\u093f\u0938 \u0915\u0949\u0932\u092e \u0915\u094b \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u092e\u0947\u0902 \u0932\u0947\u0928\u093e \u0939\u0948\u0902 \u0909\u0938 \u092a\u0930 Not Null Constraint \u0910\u0921 \u0915\u0930\u0947\u0902\u0917\u0947 <\/li><li>\u092b\u093f\u0930 \u0938\u0947 \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u093f\u090f \u092c\u0928\u093e \u0926\u0947\u0902\u0917\u0947 <\/li><\/ol>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\">\u0909\u092a\u0930\u094b\u0915\u094d\u0924 \u092a\u094d\u0930\u094b\u0938\u0947\u0938 \u0915\u0940 \u0938\u092d\u0940 SQL \u0928\u093f\u091a\u0947 \u0926\u0940 \u0917\u0908 \u0939\u0948\u0902 \u0964<\/p>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\"><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT COUNT(*) FROM &lt;TABLE NAME&gt; GROUP BY &lt;COLUMN NAME&gt; HAVING COUNT(*) &gt; 0\nALTER TABLE &lt;TABLE NAME&gt; DROP PRIMARY KEY\nALTER TABLE &lt;TABLE NAME&gt; MODIFY &lt;COLUMN NAME&gt; TYPE NOT NULL\nALTER TABLE &lt;TABLE NAME&gt; ADD PRIMARY KEY &lt;COLUMN NAME&gt;<\/code><\/pre>\n\n\n\n<h2 class=\"wp-block-heading\">1. Find Duplicate Record<\/h2>\n\n\n\n<p><\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">SELECT COUNT(*) FROM &lt;TABLE NAME&gt; GROUP BY &lt;COLUMN NAME&gt; HAVING COUNT(*) &gt; 0<\/code><\/pre>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\">\u0907\u0938 SQL \u0915\u094b Execute \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0938\u092d\u0940 \u0921\u0941\u092a\u094d\u0932\u0940\u0915\u0947\u091f \u0930\u093f\u0915\u0949\u0930\u094d\u0921 \u0926\u093f\u0916\u093e\u0908 \u0926\u0947\u0902\u0917\u0947 \u0906\u092a\u0915\u094b \u0907\u0928 \u0930\u093f\u0915\u0949\u0930\u094d\u0921 \u0915\u094b \u092f\u0942\u0928\u093f\u0915 \u0915\u0930\u0928\u093e \u0939\u094b\u0902\u0917\u0947 \u092f\u0926\u093f \u0907\u0938 SQL \u0938\u0947 \u0915\u094b\u0908 Row Return \u0928\u0939\u0940\u0902 \u0939\u094b \u092e\u0924\u0932\u092c \u0915\u0940 \u0915\u094b\u0908 \u092d\u0940 \u0930\u093f\u0915\u0949\u0930\u094d\u0921 \u0921\u0941\u092a\u094d\u0932\u0940\u0915\u0947\u091f \u0928\u0939\u0940\u0902 \u0939\u0948\u0902 \u0964<\/p>\n\n\n\n<h2 class=\"wp-block-heading\">2. Drop Primary<\/h2>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\">Primary Key \u0915\u094b DROP \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0930\u0947 \u092e\u0947\u0902 \u091c\u093e\u0928\u0915\u093e\u0930\u0940 \u090a\u092a\u0930 \u0926\u0940 \u0939\u0948\u0902 <\/p>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\"><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">3. MODIFY &lt;COLUMN&gt; CONSTRAINT<\/h2>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\">\u0905\u092c \u0939\u092e\u0947\u0902 \u091c\u093f\u0938 \u0915\u0949\u0932\u092e \u0915\u094b \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u092e\u0947\u0902 \u0932\u0947\u0928\u093e \u0939\u0948\u0902 \u0909\u0938 \u092a\u0930 NOT NULL Constraint \u0910\u0921 \u0915\u0930\u0928\u093e \u0939\u094b\u0917\u093e \u0907\u0938 SQL \u0938\u0947 \u0939\u092e NOT NULL \u0910\u0921 \u0915\u0930 \u0926\u0947\u0902\u0917\u0947 <\/p>\n\n\n\n<pre class=\"wp-block-code\"><code lang=\"sql\" class=\"language-sql\">ALTER TABLE &lt;TABLE NAME&gt; MODIFY &lt;COLUMN NAME&gt; TYPE NOT NULL<\/code><\/pre>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\">\u0907\u0938 Syntax \u0938\u0947 \u0939\u092e \u0915\u093f\u0938\u0940 \u092d\u0940 \u0915\u0949\u0932\u092e \u0915\u094b NOT NULL Constraint \u0938\u0947\u091f \u0915\u0930 \u0938\u0915\u0924\u0947 \u0939\u0948\u0902 (Not Null \u0938\u0947\u091f \u0915\u0930\u0928\u0947 \u0915\u0947 \u092c\u093e\u0926 \u0939\u0940 \u0939\u092e \u0915\u093f\u0938\u0940 Column \u0915\u094b Primary Key \u092e\u0947\u0902 \u0910\u0921 \u0915\u0930 \u092a\u093e\u0924\u0947 \u0939\u0948\u0902 \u0964<\/p>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\">4. Add Primary <\/h2>\n\n\n\n<pre class=\"wp-block-code\"><code class=\"\">ALTER TABLE &lt;TABLE NAME> ADD PRIMARY KEY (COLUMN NAME 1 , COLUMN NAME 2 );<\/code><\/pre>\n\n\n\n<p><\/p>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"\u0939\u092e-\u0930-\u0905\u0928-\u092f-\u0906\u0930-\u091f-\u0915\u0932\"><strong>\u0939\u092e\u093e\u0930\u0947 \u0905\u0928\u094d\u092f \u0906\u0930\u094d\u091f\u093f\u0915\u0932<\/strong><\/h2>\n\n\n\n<ul class=\"wp-block-list\"><li><a href=\"https:\/\/selfimagination.in\/tips\/mysql-function\/\">MySQL Function<\/a><\/li><li><a href=\"https:\/\/selfimagination.in\/tips\/mysql-stored-procedure\/\">MySQL Stored Procedure<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/6208519383164929361#\" target=\"_blank\" rel=\"noreferrer noopener\">PHP Get \/Post Method \u0915\u0947 \u092c\u093e\u0930\u0947 \u092e\u0947\u0902 \u091c\u093e\u0928\u0947<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/6208519383164929361#\" target=\"_blank\" rel=\"noreferrer noopener\">PHP Math Function \u0915\u0947 \u092c\u093e\u0930\u0947 \u092e\u0947\u0902 \u091c\u093e\u0928\u0947<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/6208519383164929361#\" target=\"_blank\" rel=\"noreferrer noopener\">C \u0938\u0947 C ++ \u0938\u0940\u0916\u0947 \u0938\u0930\u0932 \u0936\u092c\u094d\u0926\u094b\u0902 \u092e\u0947\u0902<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/6208519383164929361#\" target=\"_blank\" rel=\"noreferrer noopener\">PHP Variable \u0915\u0947 \u092c\u093e\u0930\u0947 \u092e\u0947\u0902 \u091c\u093e\u0928\u0947<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/6208519383164929361#\" target=\"_blank\" rel=\"noreferrer noopener\">Arduino Control Structure<\/a>&nbsp;<\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/6208519383164929361#\" target=\"_blank\" rel=\"noreferrer noopener\">Union in C<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/1585571442105143831#\" target=\"_blank\" rel=\"noreferrer noopener\">Declaration of Pointer in C<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/1585571442105143831#\" target=\"_blank\" rel=\"noreferrer noopener\">Search jQuery<\/a><\/li><li><a href=\"https:\/\/www.blogger.com\/blog\/post\/edit\/7447982977203437413\/1585571442105143831#\" target=\"_blank\" rel=\"noreferrer noopener\">MySQL Create Table | Alter Table | Drop Table<\/a><\/li><\/ul>\n\n\n\n<p class=\"wp-block-zozuk-wphindi\"><\/p>\n","protected":false},"excerpt":{"rendered":"<p>What is Primary Key? \u092a\u094d\u0930\u093e\u0907\u092e\u0930\u0940 \u0915\u0940 \u0915\u094d\u092f\u093e \u0939\u094b\u0924\u0940 \u0939\u0948\u0902 ? \u091c\u092c \u092d\u0940 \u0939\u092e\u0947 \u0915\u093f\u0938\u0940 \u092d\u0940 \u091f\u0947\u092c\u0932 \u092e\u0947 \u0915\u093f\u0938\u0940 Row \u0915\u094b Unique Identify \u0915\u0930\u0928\u093e \u0939\u094b \u0924\u092c \u0939\u092e \u091c\u093f\u0938 Column Value \u0915\u094b \u0906\u0927\u093e\u0930 \u092e\u093e\u0928\u0924\u0947 \u0939\u0948\u0902 \u0909\u0938\u0947 \u0939\u0940 primary key \u0915\u0939\u093e \u091c\u093e\u0924\u093e \u0939\u0948\u0902 \u0964 \u0909\u0926\u093e\u0939\u0930\u0923 \u0915\u0947 \u0932\u093f\u090f \u092f\u0926\u093f \u0939\u092e\u093e\u0930\u0947 \u092a\u093e\u0938 Students Record \u0939\u0948\u0902 \u0924\u094b \u0909\u0938\u092e\u0947 Scholar Number Primary [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":809,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[],"class_list":["post-800","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-mysql"],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"https:\/\/i0.wp.com\/selfimagination.in\/tips\/wp-content\/uploads\/2021\/04\/mysql-primary-key.jpg?fit=1200%2C628&ssl=1","_links":{"self":[{"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/posts\/800","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/comments?post=800"}],"version-history":[{"count":28,"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/posts\/800\/revisions"}],"predecessor-version":[{"id":8320,"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/posts\/800\/revisions\/8320"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/media\/809"}],"wp:attachment":[{"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/media?parent=800"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/categories?post=800"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/selfimagination.in\/tips\/wp-json\/wp\/v2\/tags?post=800"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}