Jump to content
TaKo91

FireDAC - TFDTable how to add FOREIGN KEY

Recommended Posts

Hello,

I have a TFDconnection to Sqlite database. I already have some tables in the database which are created with TFDTable->CreateTable() method. Now I would like to create a table with primary and foreign keys:

CREATE TABLE Channels (
    channel_id INTEGER PRIMARY KEY,
    task_id INTEGER,
    FOREIGN KEY (task_id) REFERENCES tasks (task_id)
);

Where can I add Primary key and Foreign key to TFDTable before I create it?

Thanks for the replies.

 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×