
04-12-2008
|
|
|
Re: how to add an autoincrement field in a select
nintesa wrote:
> Hello from Italy!
>
>
> I have a table students with fields name and age
>
> I need to do a select query like:
>
> select name
> from students
>
> where I would like to add a field that is auto-increment, so the query
> result must be:
>
> id, name
> 1 mario
> 2 gino
> 3 saverio
> 4 ...
>
> But I don't now how I can put a auto-increment field in a select
> statement...
>
> Can anyone help me?
>
> Thanks!
http://forums.mysql.com/read.php?10,36490,36511
|