2
(click on this box to dismiss)
What is the best way to "SELECT FROM DUAL" in CUBRID?
I have found some korean forum references telling me that I could use db_root instead of dual, but I'm not sure if that's correct... I'm looking for a syntax-trick to allow for queries like
SELECT 1 WHERE 1 = 1
In some databases, the above syntax is already correct. In other databases, there is a dummy table called DUAL, which I can put to make the syntax work:
SELECT 1 FROM DUAL WHERE 1 = 1
What's the best thing to do in CUBRID? Currently, I've come up with this solution here (which I'm also using in jOOQ's Ingres integration):
SELECT 1 FROM (SELECT 1 AS DUAL) AS DUAL WHERE 1 = 1
1
Answer
tagged
asked last year
viewed 567 times