Herouth Maoz wrote:
> INSERT INTO BOOK (name, author)
> SELECT 'War and Peace', oid
> FROM author
> WHERE name = 'Tolstoy';
Thanks! Now what if I had...
CREATE TABLE book (author oid, publisher oid);
What is the syntax? Is it...
INSERT INTO BOOK(author, publisher)
SELECT author.oid, publisher.oid
FROM author, publisher
WHERE author.name = 'Tolstoy' AND publisher.name = 'Penguin';
Is that right?
--
Chris Bitmead
http://www.bigfoot.com/~chris.bitmead
mailto:chris.bitmead@bigfoot.com