Hi Richard, So in these cases there is no benefit from creating an index on a column that is INTEGER PRIMARY KEY?
If so is there a way of exposing the fact that INTEGER PRIMARY KEY are used as the key tot he B-Tree table? By looking in SQLite_Master it isn't obvious at all. regards Greg ----- Original Message ----- From: D. Richard Hipp To: Greg Obleshchuk Sent: Tuesday, February 10, 2004 9:29 AM Subject: Re: [sqlite] Re: [inbox] Re: [sqlite] Primary key and index Greg Obleshchuk wrote: > > Select * , Product_Description.ProductName from ORDERS , Product_Description > where ORDERS.Product_ID = Product_Description.Product_ID > > or would you have to do this > > Select * , Product_Description.ProductName from ORDERS , Product_Description > where ORDERS.Product_ID = Product_Description.ROWID > If Product_Description.Product_ID is an INTEGER PRIMARY KEY, then Product_Description.Product_ID is just an alias for Product_Description.ROWID. The two queries are identical. Verify this by using EXPLAIN and seeing that both generate identical byte code. -- D. Richard Hipp -- [EMAIL PROTECTED] -- 704.948.4565