MySQL: Include arbitrary count in SELECT

Recently I had some data that I needed to add an arbitrary count column to. MySQL lets you use user defined variables in your queries to augment your output. Here is an example that I ended up using to add a sequence number to a CSV I was generating.

set @num := 10;
SELECT First, Last, @num := @num+1 AS SequencNumber FROM CustInfo c;


Note: Replies will be formatted with PHP Markdown Extra syntax.

Name: Email (Not Required):
 
Logged IP: 3.147.78.242
To prevent spam please submit by clicking the kitten: