robinsmathew wrote: > hey i hve created a table > CREATE TABLE video_tab (video_id INTEGER, project_id INTEGER, > video_path VARCHAR(100), video_length INTEGER, video_type > VARCHAR(10), video_size VARCHAR(10), CONSTRAINT video_pk PRIMARY > KEY(video_id, project_id), CONSTRAINT fk_project_id FOREIGN KEY > (project_id) REFERENCES project_tab(project_id)); > > and wrote a trigger for the foreign key constraint... > anyways i have to write a trigger for the foreign key constraint does > CONSTRAINT fk_project_id FOREIGN KEY (project_id) REFERENCES > project_tab(project_id) make any difference in the CREATE TABLE > command?
SQLite engine ignores FOREIGN KEY constraints. However, SQLite comes with a tool that can parse such constraints and automatically generate triggers necessary to simulate them: http://www.sqlite.org/cvstrac/fileview?f=sqlite/tool/genfkey.README Igor Tandetnik _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users