Unix Technical Forum

How to get the row number at mysql

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


Go Back   Unix Technical Forum > Database Server Software > MySQL

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-28-2008, 10:41 AM
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-28-2008, 10:41 AM
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
==================
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #3 (permalink)  
Old 02-28-2008, 10:41 AM
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.

Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
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 On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 07:03 PM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com