Question

I have a situation where I need to do something like

select 2, id from users;

I think that would work at least with Oracle but it doesn't work in Mysql. Any ideas?

Was it helpful?

Solution

I think you'll need to assign a name for your arbitrary value:

SELECT 2 AS arbitrary_value, id FROM users;

OTHER TIPS

your request is ok. Maybe you sould define more precisely "Doesn't work".

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top