This is really silly but I can't see where I am making the mistake: I am trying to add a foreign key to an existing table (sqlite3) with this sql statement:
ALTER TABLE tblDetail ADD FOREIGN KEY (master_id) REFERENCES tblMaster(id)
I get this error: near "FOREIGN": syntax error:
I can't see what I am doing wrong here. Any help would be greatly appreciated. Thank you.