DBA > Job Interview Questions > DERBY Java Database FAQs

SQL Tips - Tricks of the VALUES Clause - Creatin

More DBA job interview questions and answers at http://dba.fyicenter.com/Interview-Questions/

(Continued from previous question...)

SQL Tips - Tricks of the VALUES Clause - Creating Empty Queries

Developers using Derby in existing applications might need to create "empty" queries with the right result shape for filling in bits of functionality Derby does not supply. Empty queries of the right size and shape can be formed off a single values table and a "WHERE FALSE" condition:

SELECT *
FROM (VALUES ('',1,"TRUE")) AS ProcedureInfo(ProcedureName,NumParameters,
ProcedureValid)
WHERE 1=0

(Continued on next question...)

Other Job Interview Questions