Re: possible to add a "record number" to a query?
| From: | Chris Hewitt | Date: | Thu, 13 Jun 2002 14:13:40 +0000 |
| Subject: | Re: possible to add a "record number" to a query? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-101965@lists.php.net to get a copy of this message | ||
Jeff,
You don't tell us which database. If its Oracle then there is ROWID. Using some sort of record number is good for linking tables as it a primary/foreign key, but otherwise why would you want it? If you do not have such a field as this at present (and want one), you could always add one (ALTER TABLE ADD ColName....).
This really is a pure sql question, not relevant to php and this list.
HTH
Chris
Jeff Field wrote:
I would like to have a column returned in a query that tells you which record I'm looking at? Sort of like an auto_increment? IOW, the query results would look like: record first last1 john doe 2 joe blow 3 carol fisherThe table only has first and last, but I want the results to add something like record to tell me which record it is. Thanks for any help! Jeff