Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I need to do a SELECT query where I get the value of the field "money". The field doesn't actually exist in the database. I just need the query to return this field with a fixed value; in this case a value in USD.

How do I return a constant value in a SELECT statement?

share|improve this question
Related: – trejder Mar 12 '15 at 10:52
up vote 8 down vote accepted

If the value is always going to be the same you can do something like this:


Just replace a.* with the columns you want to return and INFORMATION_SCHEMA.SCHEMATA with the schema and table(s) you want to query.

I hope this is helpful to you.

share|improve this answer
Thanks a lot. Works like a charm. Just curious. What is that last 'AS a' (after 'FROM INFORMATION_SCHEMA.SCHEMATA') for? – fedejp Aug 8 '12 at 18:03
No problem at all. The AS specifies an alias for the table, it is essentially a short name that you can reference the table by. – Mr.Brownstone Aug 8 '12 at 18:05
Oh, great. I didn't that you could use aliases for tables. Thanks a lot! – fedejp Aug 8 '12 at 18:08

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.