> foreign key ChildTable (ChildColumn1, ChildColumn2) > references ParentTable (ParentColumn1, ParentColumn2) > on delete no action > > I have a few questions: > > 1. What does SQLite do if the action is just left blank? Does it have the > same affect as explicitly writing "no action"?
Yes. Defaults to NO ACTION. > foreign key ChildTable (ChildColumn1, ChildColumn2) > references ParentTable (ParentColumn1, ParentColumn2) > > 2. I modified the schema to include "no action" on an app on my iPad (running > SQLite version 3.6.23.2). But when I move it to my Mac (running SQLite > version 3.6.12) and then run: > > pragma integrity_check; > > I get an error: > > SQL error: malformed database schema (ChildTable) - near "no": syntax error > > Is this to be expected? I know that foreign key actions are supported in > SQLite version 3.6.19 onward, but previous version supported parsing the > foreign key schema. Did it not support parsing "no action"? Right. NO ACTION was not parsed prior to 3.6.19. > 3. For backwards parsing compatibility, am I better off just leaving the > action blank instead of explicitly writing "on delete no action"? Yes. Good plan. Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users