Im trying to create a table programmatically in sqlite. But it gives me an syntacs error when im trying to create a foreign key constraint. Can anybody tell me why.
this is my code:
CREATE TABLE tblUser (ID INT64 Primary Key, Name NVARCHAR(100) NOT NULL, EMail
NVARCHAR(100) NOT NULL);
CREATE TABLE tblMachine (ID INT64 Primary Key, Name NVARCHAR(100) NOT NULL,
ProcessorID NVARCHAR(100) NOT NULL, BiosID NVARCHAR(100) NOT NULL);
CREATE TABLE tblLicenseInfo (ID INT64 Primary Key, UserID INT64 NOT NULL,
MachineID INT64 NOT NULL, ExpirationDate DATETIME NOT NULL, DateOfChange DATETIME
NOT NULL, LicenseKey NVARCHAR(100) NOT NULL),
FOREIGN KEY (UserID) REFERENCES tblUser.ID,
FOREIGN KEY (MachineID) REFERENCES tblMachine.ID;
thank you very much.