开发者

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜