If your're using some other programming language to fetch the results, maybe it should be better to do it with that language. Otherwise, if you really need it to be in SQL you can, for example, use variables like this:
SET @c:=0; SELECT @c:=@c+1, Name, St, PNumber FROM TABLE; On Fri, 2003-02-14 at 13:36, John Thorne wrote: > Hello > > Query: > > SELECT Name, St, PNumber > >From TABLE > WHERE St = FL > ORDER BY PNumber > > Would like output to be: > > 1 Joe Jones 123-123-1234 > 2 Mary Adams 123-123-4567 > 3 Ted Smith 145-456-8974 > etc > > How can I generate a record number > > SELECT recnu(), Name, St, PNumber ?? > > thanks > > jrt -- Diana Soares --------------------------------------------------------------------- Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php