How to get the row number at mysql

This is a discussion on How to get the row number at mysql within the MySQL Database forums, part of the Database Forums category; When I use select and get a result set ,then I found a column that indicate the row number in ...


Go Back   Usenet Forums > Database Forums > MySQL Database

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 04-26-2007
hi and hello
 
Posts: n/a
Default How to get the row number at mysql

When I use select and get a result set ,then I found a column that
indicate the row number in the result set is needed.This is for
reporting.
Is there a function which can fetch the row number in the result set ?
thanks.

Reply With Quote
  #2 (permalink)  
Old 04-26-2007
Jerry Stuckle
 
Posts: n/a
Default Re: How to get the row number at mysql

hi and hello wrote:
> When I use select and get a result set ,then I found a column that
> indicate the row number in the result set is needed.This is for
> reporting.
> Is there a function which can fetch the row number in the result set ?
> thanks.
>


There is no "row number" in MySQL (and in SQL in general, although some
RDBMSs have implemented one). But you can put in an autoincrement
column to give you a similar effect.

--
==================
Remove the "x" from my email address
Jerry Stuckle
JDS Computer Training Corp.
jstucklex@attglobal.net
==================
Reply With Quote
  #3 (permalink)  
Old 04-26-2007
strawberry
 
Posts: n/a
Default Re: How to get the row number at mysql

On Apr 26, 5:53 am, hi and hello <nkappro...@gmail.com> wrote:
> When I use select and get a result set ,then I found a column that
> indicate the row number in the result set is needed.This is for
> reporting.
> Is there a function which can fetch the row number in the result set ?
> thanks.


There are no row numbers as such. Try to describe your problem a
little more thoroughly and we'll see if we can help.

Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 07:38 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0