MySQL table -> Can you return the same row multiple times, in the same query?

You would have to do something like this:

SELECT * FROM menu WHERE item_id = 1
UNION ALL
SELECT * FROM menu WHERE item_id = 1
UNION ALL
SELECT * FROM menu WHERE item_id = 2

You could join on another table, for example

SELECT * FROM menu
INNER JOIN order_items ON menu.item_id = order_items.item_id
WHERE order_id = 123;

Or just duplicate them in your application.

You shouldn't really need to do what you're asking for.


You just make a join among its aliases, e.g.

select top 5 * from item a, item b where a.itemid =1

It will print data like the following.

1 abc
1 abc
1 abc
1 abc
1 abc

Hope, you will understand.