Answer the question
In order to leave comments, you need to log in
Select query displaying the same row from a column multiple times in a row??
Example:
There is a table in it with a column with one value, it needs to be displayed several times in a row
THEN is
| name
| Pavel
It is required to display the same line 5 times in a row as a column using Select
| name
| Pavel
| Pavel
| Pavel
| Pavel
| Pavel
As I understand it, there must be some kind of cycle or how the request should look
Just duplicate the line
Answer the question
In order to leave comments, you need to log in
SET @i = 0;
WHILE @i < 5
SET @i = @i + 1;
select `name` from `tablename` where `name` = "Павел"
END
Correct answer:
SELECT TOP (5) [table].Name
FROM [table] CROSS JOIN [table] AS table_5_more_rows
WHERE ([table].Name = 'Павел')
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question