In MySQL, the only option (Alias ​​is needed only for the first number):
select 1 ID union select 2 union select 3 union select 5
The most beautiful (for a small number of numbers) version can be written in MS-SQL and Postrgess :
select * from (values (1),(2),(3),(5)) as t(id)
Oracle (Using system type as collection):
select column_value ID from table(sys.odcinumberlist(1,2,3,5))
If there are much more numbers and they are just running in a row, then it is almost universal (Of the widely used DBMS, it does NOT work only in MySQL):
with Q as ( select 1 ID union all select ID+1 from Q where ID<5 ) select * from Q
The most concise (IMHO) option for a large number of numbers in a row in Oracle :
select rownum id from DUAL connect by rownum<6
order byforgot. - i-oneidcan be written only on the first number in the union - Mike