SQLize Online / PHPize Online  /  SQLtest Online

A A A
Share      Blog   Popular
Copy Format Clear
Create Table Specialty( SpecialtyNumber char(10) Not Null, SpecialtyName char (40), CONSTRAINT pk_sn PRIMARY KEY (SpecialtyNumber), CONSTRAINT uq_sn Unique (SpecialtyNumber) ); Create Table Doctor( DoctorID char(10) Not Null, Name char (40) Not Null, Phone char (20) Not Null, SpecialtyNumber char(10) Not Null, Supervisor char(10), CONSTRAINT pk_did PRIMARY KEY (DoctorID), CONSTRAINT uq_did Unique (DoctorID) ); ALTER TABLE Doctor ADD CONSTRAINT fk_Specialty FOREIGN KEY (SpecialtyNumber) REFERENCES Specialty(SpecialtyNumber);
Stuck with a problem? Got Error? Ask ChatGPT!
Copy Clear