create a table in sql with primary key
snippet in sql

create a table in sql with primary key

user1867


CREATE TABLE table_name
(
   Column1 datatype,		// column1 and datatype
   Column2 datatype,		// column2 and datatype
   Column3 datatype,		// column3 and datatype
  
   PRIMARY KEY (Column1);	// column1 is the primary key
); 

make primary key in sql

user4186


CREATE TABLE Persons
(

    ID int NOT NULL PRIMARY KEY,

   
LastName varchar(255) NOT NULL,

   
FirstName varchar(255),

   
Age int

);