On 14 Mar 2010, at 3:14pm, P Kishor wrote: > CREATE TABLE books ( > id INTEGER PRIMARY KEY, > title TEXT, > author INTEGER DEFAULT (SELECT Max(id) FROM authors) > ); > > and that just ain't gonna work.
Thanks, Puneet, I think that's the syntax I was groping towards. Good to know it wasn't just me failing to do it right. > A TRIGGER is the most elegant solution, and trivial to implement. But if anyone has any ideas I'd love to see them. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users