On Mon, Feb 28, 2005 at 05:38:24PM -0000, Tim Anderson wrote: > > > SELECT Name, Title, Books.ID, Authors.ID FROM Books inner > > join Authors > > > on Books.AuthorID = Authors.ID ORDER BY Authors.Name, Books.Title;
> Not quite. You wanted the column called "Books.ID" so that was > specified. Is it unreasonable to then expect to retrieve it as No, it was not. THIS specifies that you want the column name to be "Books.ID": select Books.ID as "Books.ID" from ... I suspect that is per the SQL standard, although I have not checked. Note that "." is not normally allowed in column names so you have to surround it in double quotes. Btw, I haven't tried this in SQLite but that's how it works in Oracle, e.g.: SQL> select u.username from user_users u; USERNAME ------------------------------ DDR_DEV SQL> select u.username as "u.username" from user_users u; u.username ------------------------------ DDR_DEV SQL> select u.username as u.username from user_users u; select u.username as u.username from user_users u * ERROR at line 1: ORA-00923: FROM keyword not found where expected -- Andrew Piskorski <[EMAIL PROTECTED]> http://www.piskorski.com/