Answers for "create table with multiple primary key"

SQL
2

how to make multiple keys as primary in bdms

CREATE TABLE `Donor`(
  `did` int(50) NOT NULL,
  `oid` int(50) NOT NULL,
  `dname` varchar(50) NOT NULL,
  `dblood` varchar(50) NOT NULL,
  PRIMARY KEY (`did`, `oid`)
);
Posted by: Guest on May-07-2020
0

primary key multiple

CREATE TABLE Persons (
    Rollno int NOT NULL,
    FirstName varchar(30),
    LastName varchar(30) NOT NULL,
    class varhcar(20),
    Age int,
    CONSTRAINT PK_Student PRIMARY KEY (Rollno,LastName)
);
Posted by: Guest on July-06-2021

Code answers related to "create table with multiple primary key"

Code answers related to "SQL"

Browse Popular Code Answers by Language