Search code examples
mysql

What's the best MySQL alternative to dual?


So, primarily I work in oracle and have gotten spoiled by working with dual. For a user with select privileges on a given database how could you reproduce the dual functionality?

IE:

Select 'foo' from dual

Probably a very simple answer that I'm just missing.


Solution

  • I remember using Select 1 from dual in Oracle and just select 1; in MySQL. So I think you just try without a table reference.

    This was to verify connectivity so not sure if it applies in your case.