Parser SQL
Hi,
when the foreing Key has a name, for ex "CONSTRAINT FK_Address_Customer FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID)" the parser dont recognize the relationship.
If I have many tables and relationships in a script, this could be cumbersone typing one by one.
Im using the version 14.81.
and follow the sample of this video
https://www.youtube.com/watch?v=z9Ya8kgRyU4
the script
-- Test IdeasModeler
CREATE TABLE Customer (
CustomerID INT PRIMARY KEY,
FirstName VARCHAR(255) NOT NULL,
LastName VARCHAR(255) NOT NULL,
Email VARCHAR(255) NOT NULL,
PhoneNumber VARCHAR(15)
);
CREATE TABLE Address (
AddressID INT PRIMARY KEY,
CustomerID INT,
StreetAddress VARCHAR(255) NOT NULL,
City VARCHAR(255) NOT NULL,
City VARCHAR(255) NOT NULL,
State VARCHAR(100),
PostalCode VARCHAR(20),
Country VARCHAR(100),
CONSTRAINT FK_Address_Customer FOREIGN KEY (CustomerID) REFERENCES Customer(CustomerID)
);
regards
Dusan Rodina - softwareideas.net 20 November 2024 11:45:04
-
Paul Cordova 20 November 2024 13:30:58
RE: -