Select something + arbitrary number in Mysql

I have a situation where I need to do something like

select 2, id from users;

      

I think this works at least with Oracle, but it doesn't work in Mysql. Any ideas?

0


source to share


2 answers


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



SELECT 2 AS arbitrary_value, id FROM users;

      

+4


source


your request is ok. You may have pinpointed "Doesn't work".



0


source







All Articles