MySQL Forums
Forum List  »  InnoDB

How can i put numbering on my query?
Posted by: Roland Francisco
Date: April 29, 2005 01:59AM

let say my query is

SELECT [CategoryName], [Description] FROM [Northwind].[dbo].[Categories]

then the result of this will be

CategoryName Description
-------------- ------------------------------------------------------------------
Beverages Soft drinks, coffees, teas, beers, and ales
Condiments Sweet and savory sauces, relishes, spreads, and seasonings
Confections Desserts, candies, and sweet breads
Dairy Products Cheeses
Grains/Cereals Breads, crackers, pasta, and cereal
Meat/Poultry Prepared meats
Produce Dried fruit and bean curd
Seafood Seaweed and fish


but what I want to do is put a numbering before the field "CategoryName", my desired result is, not using the CategoryID field

# CategoryName Description
-------- -------------- ---------------------------------------------------------
1 Beverages Soft drinks, coffees, teas, beers, and ales
2 Condiments Sweet and savory sauces, relishes, spreads, and seasonings
3 Confections Desserts, candies, and sweet breads
4 Dairy Products Cheeses
5 Grains/Cereals Breads, crackers, pasta, and cereal
6 Meat/Poultry Prepared meats
7 Produce Dried fruit and bean curd
8 Seafood Seaweed and fish

any please help me!!!!!

Options: ReplyQuote


Subject
Views
Written By
Posted
How can i put numbering on my query?
2977
April 29, 2005 01:59AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.