Select a single column from a list of numbers in MySQL
I have a list of numbers (2, 8, 12, 2, 48, 7...). I would like to select this list as a single column using MySQL.
I want m开发者_如何学运维y results to be:
Column 1
--------
2
8
12
2
48
7
...
What is the recommended way to do this?
(Edit: Ideally, I would like to do this without resorting to stored procedures or functions.)
have a look at this procedure. it seems to be doing exactly what you're looking for.
Tom,
I think you may be required to use a Stored Procedure to achieve this functionality. Here's a sample from forge.mysql.
精彩评论