“fremde Schlüssel” Code-Antworten

fremde Schlüssel

CREATE TABLE Employee(
    EmployeeID int NOT NULL,
    LastName varchar(50) NOT NULL,
    FirstName varchar(20) NOT NULL,
    Age int,
    DeptNo int,
    PRIMARY KEY (EmployeeID),
    FOREIGN KEY (DeptNo) REFERENCES Department(DeptNo)
);
Misty Mongoose

Unbekannter Schlüssel

USE Organization
CREATE TABLE Employee_Office
(
Id INT PRIMARY KEY IDENTITY(1,1),
Emp_Id int FOREIGN KEY REFERENCES Employee(Id),
Office_Id int FOREIGN KEY REFERENCES Office(Id)
)
Adorable Armadillo

Unbekannter Schlüssel

USE Organization
CREATE TABLE Employee
(
Id INT PRIMARY KEY IDENTITY(1,1),
Name VARCHAR (50) NOT NULL,
Age INT,
Gender VARCHAR (50),
Dep_Id int FOREIGN KEY REFERENCES Department(Id),
Insur_Id int FOREIGN KEY REFERENCES Insurance(Id)
)
Adorable Armadillo

Unbekannter Schlüssel

ALTER TABLE your_table ADD FOREIGN KEY (your_column) REFERENCES other_table(other_column);
Healthy Hare

Ähnliche Antworten wie “fremde Schlüssel”

Fragen ähnlich wie “fremde Schlüssel”

Durchsuchen Sie beliebte Code-Antworten nach Sprache

Durchsuchen Sie andere Codesprachen