问题
I would like to union some data, but a simple select example not working. Selecting existing tables work fine...
SELECT 1 as foo
Message:
can't format message 13:896 -- message file C:\xxxx\firebird.msg not found. Dynamic SQL Error. SQL error code = -104. corrupt pool.
In MySQL and Postgres is no problem with these simple select..
Thanks for help!
回答1:
Firebird (like many other DBMS) requires a FROM
clause. In Oracle you'd use the DUAL
table, in Firebird you can use RDB$DATABASE
SELECT 1 as foo
FROM RDB$DATABASE;
As RDB$DATABASE
always contains exactly one row, this works the same way as Oracle's DUAL
table (or IBM's SYSDUMMY
)
回答2:
It incorrect syntax for firebird. Right SELECT 1 as foo from RDB$DATABASE
. RDB$DATABASE
it system table for it RDBMS. You can read about FIREBIRD system tables here.
来源:https://stackoverflow.com/questions/19789861/firebird-2-1-simple-select